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