@ndla/preset-panda 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/styles.css +31 -0
- package/es/globalCss.js +33 -8
- package/lib/globalCss.js +33 -8
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -208,6 +208,37 @@
|
|
|
208
208
|
--skew-y: 0;
|
|
209
209
|
--scale-x: 1;
|
|
210
210
|
--scale-y: 1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@media screen and (max-width: 37.56rem) {
|
|
214
|
+
.ndla-article details,.ndla-article blockquote,.ndla-article [data-embed-type="framed-content"],.ndla-article [data-embed-type="factbox"],.ndla-article table,.ndla-article [data-embed-type="related-content-list"],.ndla-article [data-embed-type="link-block-list"],.ndla-article [data-embed-type="blog-post"],.ndla-article [data-embed-type="campaign-block"],.ndla-article [data-embed-type="key-figure"],.ndla-article [data-embed-type="grid"],.ndla-article [data-embed-type="contact-block"],.ndla-article [data-embed-type="file-list"],.ndla-article [data-embed-type="uu-disclaimer"] {
|
|
215
|
+
margin-block-start: var(--spacing-xlarge);
|
|
216
|
+
margin-block-end: var(--spacing-xlarge);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.ndla-article section:not([class]) > :is(h2, [data-embed-type="copy-heading"]),.ndla-article section:not([class]) > div:not([class]) > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="framed-content"] > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="grid"] > div > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="grid-parallax"] > div > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="factbox"] > div > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="copyright"] > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="uu-disclaimer"] > :is(h2, [data-embed-type="copy-heading"]),.ndla-article details > :is(h2, [data-embed-type="copy-heading"]),.ndla-article blockquote > :is(h2, [data-embed-type="copy-heading"]) {
|
|
220
|
+
margin-block-start: var(--spacing-large);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.ndla-article section:not([class]) > h3,.ndla-article section:not([class]) > div:not([class]) > h3,.ndla-article [data-embed-type="framed-content"] > h3,.ndla-article [data-embed-type="grid"] > div > h3,.ndla-article [data-embed-type="grid-parallax"] > div > h3,.ndla-article [data-embed-type="factbox"] > div > h3,.ndla-article [data-embed-type="copyright"] > h3,.ndla-article [data-embed-type="uu-disclaimer"] > h3,.ndla-article details > h3,.ndla-article blockquote > h3 {
|
|
224
|
+
margin-block-start: var(--spacing-medium);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.ndla-article section:not([class]) > :is(h4, h5, h6),.ndla-article section:not([class]) > div:not([class]) > :is(h4, h5, h6),.ndla-article [data-embed-type="framed-content"] > :is(h4, h5, h6),.ndla-article [data-embed-type="grid"] > div > :is(h4, h5, h6),.ndla-article [data-embed-type="grid-parallax"] > div > :is(h4, h5, h6),.ndla-article [data-embed-type="factbox"] > div > :is(h4, h5, h6),.ndla-article [data-embed-type="copyright"] > :is(h4, h5, h6),.ndla-article [data-embed-type="uu-disclaimer"] > :is(h4, h5, h6),.ndla-article details > :is(h4, h5, h6),.ndla-article blockquote > :is(h4, h5, h6) {
|
|
228
|
+
margin-block-start: var(--spacing-small);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.ndla-article section:not([class]) > :is(figure),.ndla-article section:not([class]) > div:not([class]) > :is(figure),.ndla-article [data-embed-type="framed-content"] > :is(figure),.ndla-article [data-embed-type="grid"] > div > :is(figure),.ndla-article [data-embed-type="grid-parallax"] > div > :is(figure),.ndla-article [data-embed-type="factbox"] > div > :is(figure),.ndla-article [data-embed-type="copyright"] > :is(figure),.ndla-article [data-embed-type="uu-disclaimer"] > :is(figure),.ndla-article details > :is(figure),.ndla-article blockquote > :is(figure) {
|
|
232
|
+
margin-block-start: var(--spacing-xlarge);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ndla-article section:not([class]) > :is(:first-child),.ndla-article section:not([class]) > div:not([class]) > :is(:first-child),.ndla-article [data-embed-type="framed-content"] > :is(:first-child),.ndla-article [data-embed-type="grid"] > div > :is(:first-child),.ndla-article [data-embed-type="grid-parallax"] > div > :is(:first-child),.ndla-article [data-embed-type="factbox"] > div > :is(:first-child),.ndla-article [data-embed-type="copyright"] > :is(:first-child),.ndla-article [data-embed-type="uu-disclaimer"] > :is(:first-child),.ndla-article details > :is(:first-child),.ndla-article blockquote > :is(:first-child) {
|
|
236
|
+
margin-block-start: var(--spacing-xlarge);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.ndla-article section:not([class]) > :first-child,.ndla-article section:not([class]) > div:not([class]) > :first-child,.ndla-article section:not([class]) > :last-child,.ndla-article section:not([class]) > div:not([class]) > :last-child {
|
|
240
|
+
margin-block-start: var(--spacing-xlarge);
|
|
241
|
+
}
|
|
211
242
|
}
|
|
212
243
|
}
|
|
213
244
|
|
package/es/globalCss.js
CHANGED
|
@@ -66,32 +66,51 @@ export const globalCss = defineGlobalStyles({
|
|
|
66
66
|
// Non-figure block elements that should have margin above and below.
|
|
67
67
|
'& details, blockquote, [data-embed-type="framed-content"], [data-embed-type="factbox"], table, [data-embed-type="related-content-list"], [data-embed-type="link-block-list"], [data-embed-type="blog-post"], [data-embed-type="campaign-block"], [data-embed-type="key-figure"], [data-embed-type="grid"], [data-embed-type="contact-block"], [data-embed-type="file-list"], [data-embed-type="uu-disclaimer"]': {
|
|
68
68
|
marginBlockStart: "xxlarge",
|
|
69
|
-
marginBlockEnd: "xxlarge"
|
|
69
|
+
marginBlockEnd: "xxlarge",
|
|
70
|
+
tabletDown: {
|
|
71
|
+
marginBlockStart: "xlarge",
|
|
72
|
+
marginBlockEnd: "xlarge"
|
|
73
|
+
}
|
|
70
74
|
},
|
|
71
75
|
// Article content is usually wrapped in a section. The rest of the elements in this list contains other elements, and should add margin to them no matter where they are placed in the DOM.
|
|
72
76
|
'& section:not([class]), section:not([class]) > div:not([class]), [data-embed-type="framed-content"], [data-embed-type="grid"] > div, [data-embed-type="grid-parallax"] > div, [data-embed-type="factbox"] > div, [data-embed-type="copyright"], [data-embed-type="uu-disclaimer"], details, blockquote': {
|
|
73
77
|
'& > :is(h2, [data-embed-type="copy-heading"])': {
|
|
74
78
|
marginBlockStart: "xlarge",
|
|
75
|
-
marginBlockEnd: "small"
|
|
79
|
+
marginBlockEnd: "small",
|
|
80
|
+
tabletDown: {
|
|
81
|
+
marginBlockStart: "large"
|
|
82
|
+
}
|
|
76
83
|
},
|
|
77
84
|
"& > h3": {
|
|
78
85
|
marginBlockStart: "large",
|
|
79
|
-
marginBlockEnd: "xsmall"
|
|
86
|
+
marginBlockEnd: "xsmall",
|
|
87
|
+
tabletDown: {
|
|
88
|
+
marginBlockStart: "medium"
|
|
89
|
+
}
|
|
80
90
|
},
|
|
81
91
|
"& > :is(h4, h5, h6)": {
|
|
82
92
|
marginBlockStart: "medium",
|
|
83
|
-
marginBlockEnd: "xsmall"
|
|
93
|
+
marginBlockEnd: "xsmall",
|
|
94
|
+
tabletDown: {
|
|
95
|
+
marginBlockStart: "small"
|
|
96
|
+
}
|
|
84
97
|
},
|
|
85
98
|
"& > :is(figure)": {
|
|
86
99
|
marginBlockStart: "xxlarge",
|
|
87
|
-
marginBlockEnd: "xxlarge"
|
|
100
|
+
marginBlockEnd: "xxlarge",
|
|
101
|
+
tabletDown: {
|
|
102
|
+
marginBlockStart: "xlarge"
|
|
103
|
+
}
|
|
88
104
|
},
|
|
89
105
|
'& > :is(p, ul, ol, dl, [data-embed-type="speech"])': {
|
|
90
106
|
marginBlockStart: "xsmall",
|
|
91
107
|
marginBlockEnd: "xsmall"
|
|
92
108
|
},
|
|
93
109
|
"& > :is(:first-child)": {
|
|
94
|
-
marginBlockStart: "xxlarge"
|
|
110
|
+
marginBlockStart: "xxlarge",
|
|
111
|
+
tabletDown: {
|
|
112
|
+
marginBlockStart: "xlarge"
|
|
113
|
+
}
|
|
95
114
|
}
|
|
96
115
|
},
|
|
97
116
|
'& [data-embed-type="framed-content"], [data-embed-type="grid"] > div, [data-embed-type="grid-parallax"] > div, [data-embed-type="factbox"] > div, [data-embed-type="copyright"], [data-embed-type="uu-disclaimer"], details, blockquote': {
|
|
@@ -104,10 +123,16 @@ export const globalCss = defineGlobalStyles({
|
|
|
104
123
|
},
|
|
105
124
|
"& section:not([class]), section:not([class]) > div:not([class])": {
|
|
106
125
|
"& > :first-child": {
|
|
107
|
-
marginBlockStart: "xxlarge"
|
|
126
|
+
marginBlockStart: "xxlarge",
|
|
127
|
+
tabletDown: {
|
|
128
|
+
marginBlockStart: "xlarge"
|
|
129
|
+
}
|
|
108
130
|
},
|
|
109
131
|
"& > :last-child": {
|
|
110
|
-
marginBlockEnd: "xxlarge"
|
|
132
|
+
marginBlockEnd: "xxlarge",
|
|
133
|
+
tabletDown: {
|
|
134
|
+
marginBlockStart: "xlarge"
|
|
135
|
+
}
|
|
111
136
|
}
|
|
112
137
|
}
|
|
113
138
|
},
|
package/lib/globalCss.js
CHANGED
|
@@ -72,32 +72,51 @@ const globalCss = exports.globalCss = (0, _dev.defineGlobalStyles)({
|
|
|
72
72
|
// Non-figure block elements that should have margin above and below.
|
|
73
73
|
'& details, blockquote, [data-embed-type="framed-content"], [data-embed-type="factbox"], table, [data-embed-type="related-content-list"], [data-embed-type="link-block-list"], [data-embed-type="blog-post"], [data-embed-type="campaign-block"], [data-embed-type="key-figure"], [data-embed-type="grid"], [data-embed-type="contact-block"], [data-embed-type="file-list"], [data-embed-type="uu-disclaimer"]': {
|
|
74
74
|
marginBlockStart: "xxlarge",
|
|
75
|
-
marginBlockEnd: "xxlarge"
|
|
75
|
+
marginBlockEnd: "xxlarge",
|
|
76
|
+
tabletDown: {
|
|
77
|
+
marginBlockStart: "xlarge",
|
|
78
|
+
marginBlockEnd: "xlarge"
|
|
79
|
+
}
|
|
76
80
|
},
|
|
77
81
|
// Article content is usually wrapped in a section. The rest of the elements in this list contains other elements, and should add margin to them no matter where they are placed in the DOM.
|
|
78
82
|
'& section:not([class]), section:not([class]) > div:not([class]), [data-embed-type="framed-content"], [data-embed-type="grid"] > div, [data-embed-type="grid-parallax"] > div, [data-embed-type="factbox"] > div, [data-embed-type="copyright"], [data-embed-type="uu-disclaimer"], details, blockquote': {
|
|
79
83
|
'& > :is(h2, [data-embed-type="copy-heading"])': {
|
|
80
84
|
marginBlockStart: "xlarge",
|
|
81
|
-
marginBlockEnd: "small"
|
|
85
|
+
marginBlockEnd: "small",
|
|
86
|
+
tabletDown: {
|
|
87
|
+
marginBlockStart: "large"
|
|
88
|
+
}
|
|
82
89
|
},
|
|
83
90
|
"& > h3": {
|
|
84
91
|
marginBlockStart: "large",
|
|
85
|
-
marginBlockEnd: "xsmall"
|
|
92
|
+
marginBlockEnd: "xsmall",
|
|
93
|
+
tabletDown: {
|
|
94
|
+
marginBlockStart: "medium"
|
|
95
|
+
}
|
|
86
96
|
},
|
|
87
97
|
"& > :is(h4, h5, h6)": {
|
|
88
98
|
marginBlockStart: "medium",
|
|
89
|
-
marginBlockEnd: "xsmall"
|
|
99
|
+
marginBlockEnd: "xsmall",
|
|
100
|
+
tabletDown: {
|
|
101
|
+
marginBlockStart: "small"
|
|
102
|
+
}
|
|
90
103
|
},
|
|
91
104
|
"& > :is(figure)": {
|
|
92
105
|
marginBlockStart: "xxlarge",
|
|
93
|
-
marginBlockEnd: "xxlarge"
|
|
106
|
+
marginBlockEnd: "xxlarge",
|
|
107
|
+
tabletDown: {
|
|
108
|
+
marginBlockStart: "xlarge"
|
|
109
|
+
}
|
|
94
110
|
},
|
|
95
111
|
'& > :is(p, ul, ol, dl, [data-embed-type="speech"])': {
|
|
96
112
|
marginBlockStart: "xsmall",
|
|
97
113
|
marginBlockEnd: "xsmall"
|
|
98
114
|
},
|
|
99
115
|
"& > :is(:first-child)": {
|
|
100
|
-
marginBlockStart: "xxlarge"
|
|
116
|
+
marginBlockStart: "xxlarge",
|
|
117
|
+
tabletDown: {
|
|
118
|
+
marginBlockStart: "xlarge"
|
|
119
|
+
}
|
|
101
120
|
}
|
|
102
121
|
},
|
|
103
122
|
'& [data-embed-type="framed-content"], [data-embed-type="grid"] > div, [data-embed-type="grid-parallax"] > div, [data-embed-type="factbox"] > div, [data-embed-type="copyright"], [data-embed-type="uu-disclaimer"], details, blockquote': {
|
|
@@ -110,10 +129,16 @@ const globalCss = exports.globalCss = (0, _dev.defineGlobalStyles)({
|
|
|
110
129
|
},
|
|
111
130
|
"& section:not([class]), section:not([class]) > div:not([class])": {
|
|
112
131
|
"& > :first-child": {
|
|
113
|
-
marginBlockStart: "xxlarge"
|
|
132
|
+
marginBlockStart: "xxlarge",
|
|
133
|
+
tabletDown: {
|
|
134
|
+
marginBlockStart: "xlarge"
|
|
135
|
+
}
|
|
114
136
|
},
|
|
115
137
|
"& > :last-child": {
|
|
116
|
-
marginBlockEnd: "xxlarge"
|
|
138
|
+
marginBlockEnd: "xxlarge",
|
|
139
|
+
tabletDown: {
|
|
140
|
+
marginBlockStart: "xlarge"
|
|
141
|
+
}
|
|
117
142
|
}
|
|
118
143
|
}
|
|
119
144
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/preset-panda",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"description": "Panda preset for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "784eea9f500d7e38a2d5102286118a1da129b743"
|
|
41
41
|
}
|