@ndla/preset-panda 0.0.36 → 0.0.38

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 CHANGED
@@ -12,6 +12,10 @@
12
12
  font-feature-settings: 'ss03' on, 'liga' off, 'clig' off;
13
13
  }
14
14
 
15
+ html h1,html h2,html h3,html h4,html h5,html h6 {
16
+ text-wrap: unset;
17
+ }
18
+
15
19
  body {
16
20
  background: var(--colors-background-default);
17
21
  color: var(--colors-text-default);
@@ -175,6 +179,104 @@
175
179
  text-decoration: none;
176
180
  }
177
181
 
182
+ .codeblock {
183
+ border: 1px solid;
184
+ border-left: 4px solid;
185
+ border-radius: var(--radii-xsmall);
186
+ box-sizing: border-box;
187
+ letter-spacing: normal;
188
+ font-family: var(--fonts-code);
189
+ font-weight: var(--font-weights-normal);
190
+ font-size: var(--font-sizes-small);
191
+ line-height: var(--line-heights-small);
192
+ }
193
+
194
+ .codeblock:where([lang='zh'], [lang='zh-Hans'], [lang='zh-Hant']):not([data-pinyin]) {
195
+ font-size: calc(var(--font-sizes-small) * 1.11);
196
+ line-height: calc(var(--line-heights-small) * 1.11);
197
+ }
198
+
199
+ .codeblock {
200
+ display: block;
201
+ white-space: pre;
202
+ border-color: var(--colors-stroke-subtle);
203
+ border-left-color: var(--colors-stroke-default);
204
+ overflow-x: auto;
205
+ }
206
+
207
+ .codeblock .linenumber {
208
+ display: inline-block;
209
+ padding-block: 0;
210
+ padding-inline: var(--spacing-small);
211
+ border-right: 1px solid;
212
+ width: var(--sizes-xxlarge);
213
+ text-align: right;
214
+ margin-inline-end: var(--spacing-xsmall);
215
+ border-color: var(--colors-stroke-subtle);
216
+ }
217
+
218
+ .codeblock :nth-child(1 of .linenumber) {
219
+ padding-block-start: var(--spacing-xsmall);
220
+ }
221
+
222
+ .codeblock :nth-last-child(1 of .linenumber) {
223
+ padding-block-end: var(--spacing-xsmall);
224
+ }
225
+
226
+ .codeblock .token.comment,.codeblock .token.block-comment,.codeblock .token.prolog,.codeblock .token.doctype,.codeblock .token.cdata {
227
+ color: #7d8b99;
228
+ }
229
+
230
+ .codeblock .token.punctuation {
231
+ color: #5f6364;
232
+ }
233
+
234
+ .codeblock .token.property,.codeblock .token.tag,.codeblock .token.boolean,.codeblock .token.number,.codeblock .token.function-name,.codeblock .token.constant,.codeblock .token.symbol,.codeblock .token.deleted {
235
+ color: #c92c2c;
236
+ }
237
+
238
+ .codeblock .token.selector,.codeblock .token.attr-name,.codeblock .token.string,.codeblock .token.char,.codeblock .token.function,.codeblock .token.builtin,.codeblock .token.inserted {
239
+ color: #2f9c0a;
240
+ }
241
+
242
+ .codeblock .token.operator,.codeblock .token.entity,.codeblock .token.url,.codeblock .token.variable {
243
+ color: #a67f59;
244
+ background: rgba(255, 255, 255, 0.5);
245
+ }
246
+
247
+ .codeblock .token.atrule,.codeblock .token.attr-value,.codeblock .token.keyword,.codeblock .token.class-name {
248
+ color: #1990b8;
249
+ }
250
+
251
+ .codeblock .token.regex,.codeblock .token.important {
252
+ color: #e90;
253
+ }
254
+
255
+ .codeblock .language-css .token.string,.codeblock .style .token.string {
256
+ color: #a67f59;
257
+ background: rgba(255, 255, 255, 0.5);
258
+ }
259
+
260
+ .codeblock .token.entity {
261
+ cursor: help;
262
+ }
263
+
264
+ .codeblock .token.namespace {
265
+ opacity: 0.7;
266
+ }
267
+
268
+ .codeblock .token.important {
269
+ font-weight: var(--font-weights-normal);
270
+ }
271
+
272
+ .codeblock .token.bold {
273
+ font-weight: var(--font-weights-bold);
274
+ }
275
+
276
+ .codeblock .token.italic {
277
+ font-style: italic;
278
+ }
279
+
178
280
  *,::before,::after,::backdrop {
179
281
  --blur: /*-*/ /*-*/;
180
282
  --brightness: /*-*/ /*-*/;
package/es/globalCss.js CHANGED
@@ -16,7 +16,11 @@ export const globalCss = defineGlobalStyles({
16
16
  },
17
17
  html: {
18
18
  minHeight: "100%",
19
- fontFeatureSettings: "'ss03' on, 'liga' off, 'clig' off"
19
+ fontFeatureSettings: "'ss03' on, 'liga' off, 'clig' off",
20
+ // this is included in the css reset we use. We don't want it.
21
+ "& h1, h2, h3, h4, h5, h6": {
22
+ textWrap: "unset"
23
+ }
20
24
  },
21
25
  body: {
22
26
  background: "background.default",
@@ -140,5 +144,76 @@ export const globalCss = defineGlobalStyles({
140
144
  _visited: {
141
145
  color: "text.linkVisited"
142
146
  }
147
+ },
148
+ ".codeblock": {
149
+ border: "1px solid",
150
+ borderColor: "stroke.subtle",
151
+ borderLeft: "4px solid",
152
+ borderLeftColor: "stroke.default",
153
+ borderRadius: "xsmall",
154
+ boxSizing: "border-box",
155
+ overflowX: "auto",
156
+ textStyle: "label.medium",
157
+ fontFamily: "code",
158
+ display: "block",
159
+ whiteSpace: "pre",
160
+ "& .linenumber": {
161
+ display: "inline-block",
162
+ paddingBlock: "0",
163
+ paddingInline: "small",
164
+ borderRight: "1px solid",
165
+ borderColor: "stroke.subtle",
166
+ width: "xxlarge",
167
+ textAlign: "right",
168
+ marginInlineEnd: "xsmall"
169
+ },
170
+ "& :nth-child(1 of .linenumber)": {
171
+ paddingBlockStart: "xsmall"
172
+ },
173
+ "& :nth-last-child(1 of .linenumber)": {
174
+ paddingBlockEnd: "xsmall"
175
+ },
176
+ // The remaining css is copied from the coy theme in prismjs. A lot of css is omitted due to styling clashes
177
+ "& .token.comment, .token.block-comment, .token.prolog, .token.doctype, .token.cdata": {
178
+ color: "#7d8b99"
179
+ },
180
+ "& .token.punctuation": {
181
+ color: "#5f6364"
182
+ },
183
+ "& .token.property, .token.tag, .token.boolean, .token.number, .token.function-name, .token.constant, .token.symbol, .token.deleted": {
184
+ color: "#c92c2c"
185
+ },
186
+ "& .token.selector, .token.attr-name, .token.string, .token.char, .token.function, .token.builtin, .token.inserted": {
187
+ color: "#2f9c0a"
188
+ },
189
+ "& .token.operator, .token.entity, .token.url, .token.variable": {
190
+ color: "#a67f59",
191
+ background: "rgba(255, 255, 255, 0.5)"
192
+ },
193
+ "& .token.atrule, .token.attr-value, .token.keyword, .token.class-name": {
194
+ color: "#1990b8"
195
+ },
196
+ "& .token.regex, .token.important": {
197
+ color: "#e90"
198
+ },
199
+ "& .language-css .token.string, .style .token.string": {
200
+ color: "#a67f59",
201
+ background: "rgba(255, 255, 255, 0.5)"
202
+ },
203
+ "& .token.important": {
204
+ fontWeight: "normal"
205
+ },
206
+ "& .token.bold": {
207
+ fontWeight: "bold"
208
+ },
209
+ "& .token.italic": {
210
+ fontStyle: "italic"
211
+ },
212
+ "& .token.entity": {
213
+ cursor: "help"
214
+ },
215
+ "& .token.namespace": {
216
+ opacity: "0.7"
217
+ }
143
218
  }
144
219
  });
package/lib/globalCss.js CHANGED
@@ -22,7 +22,11 @@ const globalCss = exports.globalCss = (0, _dev.defineGlobalStyles)({
22
22
  },
23
23
  html: {
24
24
  minHeight: "100%",
25
- fontFeatureSettings: "'ss03' on, 'liga' off, 'clig' off"
25
+ fontFeatureSettings: "'ss03' on, 'liga' off, 'clig' off",
26
+ // this is included in the css reset we use. We don't want it.
27
+ "& h1, h2, h3, h4, h5, h6": {
28
+ textWrap: "unset"
29
+ }
26
30
  },
27
31
  body: {
28
32
  background: "background.default",
@@ -146,5 +150,76 @@ const globalCss = exports.globalCss = (0, _dev.defineGlobalStyles)({
146
150
  _visited: {
147
151
  color: "text.linkVisited"
148
152
  }
153
+ },
154
+ ".codeblock": {
155
+ border: "1px solid",
156
+ borderColor: "stroke.subtle",
157
+ borderLeft: "4px solid",
158
+ borderLeftColor: "stroke.default",
159
+ borderRadius: "xsmall",
160
+ boxSizing: "border-box",
161
+ overflowX: "auto",
162
+ textStyle: "label.medium",
163
+ fontFamily: "code",
164
+ display: "block",
165
+ whiteSpace: "pre",
166
+ "& .linenumber": {
167
+ display: "inline-block",
168
+ paddingBlock: "0",
169
+ paddingInline: "small",
170
+ borderRight: "1px solid",
171
+ borderColor: "stroke.subtle",
172
+ width: "xxlarge",
173
+ textAlign: "right",
174
+ marginInlineEnd: "xsmall"
175
+ },
176
+ "& :nth-child(1 of .linenumber)": {
177
+ paddingBlockStart: "xsmall"
178
+ },
179
+ "& :nth-last-child(1 of .linenumber)": {
180
+ paddingBlockEnd: "xsmall"
181
+ },
182
+ // The remaining css is copied from the coy theme in prismjs. A lot of css is omitted due to styling clashes
183
+ "& .token.comment, .token.block-comment, .token.prolog, .token.doctype, .token.cdata": {
184
+ color: "#7d8b99"
185
+ },
186
+ "& .token.punctuation": {
187
+ color: "#5f6364"
188
+ },
189
+ "& .token.property, .token.tag, .token.boolean, .token.number, .token.function-name, .token.constant, .token.symbol, .token.deleted": {
190
+ color: "#c92c2c"
191
+ },
192
+ "& .token.selector, .token.attr-name, .token.string, .token.char, .token.function, .token.builtin, .token.inserted": {
193
+ color: "#2f9c0a"
194
+ },
195
+ "& .token.operator, .token.entity, .token.url, .token.variable": {
196
+ color: "#a67f59",
197
+ background: "rgba(255, 255, 255, 0.5)"
198
+ },
199
+ "& .token.atrule, .token.attr-value, .token.keyword, .token.class-name": {
200
+ color: "#1990b8"
201
+ },
202
+ "& .token.regex, .token.important": {
203
+ color: "#e90"
204
+ },
205
+ "& .language-css .token.string, .style .token.string": {
206
+ color: "#a67f59",
207
+ background: "rgba(255, 255, 255, 0.5)"
208
+ },
209
+ "& .token.important": {
210
+ fontWeight: "normal"
211
+ },
212
+ "& .token.bold": {
213
+ fontWeight: "bold"
214
+ },
215
+ "& .token.italic": {
216
+ fontStyle: "italic"
217
+ },
218
+ "& .token.entity": {
219
+ cursor: "help"
220
+ },
221
+ "& .token.namespace": {
222
+ opacity: "0.7"
223
+ }
149
224
  }
150
225
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/preset-panda",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
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": "84234a46743d9d044f220e90e6710e2da307d65d"
40
+ "gitHead": "e29f1689ea7268f8a1eed1c99f179a3524c70758"
41
41
  }