@webstudio-is/css-data 0.60.0 → 0.62.0
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/lib/__generated__/keyword-values.js +2 -2
- package/lib/__generated__/properties.js +93 -26
- package/lib/cjs/__generated__/keyword-values.js +2 -2
- package/lib/cjs/__generated__/properties.js +93 -26
- package/lib/cjs/html-check.js +2 -0
- package/lib/cjs/html.js +521 -0
- package/lib/cjs/index.js +22 -1
- package/lib/html-check.js +1 -0
- package/lib/html.js +501 -0
- package/lib/index.js +8 -1
- package/lib/types/src/__generated__/keyword-values.d.ts +1 -1
- package/lib/types/src/__generated__/properties.d.ts +74 -26
- package/lib/types/src/html-check.d.ts +1 -0
- package/lib/types/src/html.d.ts +53 -0
- package/lib/types/src/index.d.ts +3587 -1
- package/lib/types/src/schema.d.ts +124 -124
- package/package.json +4 -2
- package/src/__generated__/keyword-values.ts +2 -2
- package/src/__generated__/properties.ts +93 -26
- package/src/html-check.ts +8 -0
- package/src/html.ts +545 -0
- package/src/index.ts +12 -1
package/src/html.ts
ADDED
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
// all styles are taken from following source
|
|
2
|
+
// https://searchfox.org/mozilla-central/source/layout/style/res/html.css
|
|
3
|
+
// https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css
|
|
4
|
+
// https://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css
|
|
5
|
+
|
|
6
|
+
import type { htmlTags as HtmlTags } from "html-tags";
|
|
7
|
+
import type { StyleProperty, StyleValue } from "./schema";
|
|
8
|
+
|
|
9
|
+
type StyleDecl = {
|
|
10
|
+
property: StyleProperty;
|
|
11
|
+
value: StyleValue;
|
|
12
|
+
};
|
|
13
|
+
type Styles = StyleDecl[];
|
|
14
|
+
|
|
15
|
+
export type Html = {
|
|
16
|
+
[tag in HtmlTags]?: Styles;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const displayBlock: Styles[number] = {
|
|
20
|
+
property: "display",
|
|
21
|
+
value: { type: "keyword", value: "block" },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const mt1em: Styles[number] = {
|
|
25
|
+
property: "marginTop",
|
|
26
|
+
value: { type: "unit", value: 1, unit: "em" },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const mb1em: Styles[number] = {
|
|
30
|
+
property: "marginBottom",
|
|
31
|
+
value: { type: "unit", value: 1, unit: "em" },
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const ml40px: Styles[number] = {
|
|
35
|
+
property: "marginLeft",
|
|
36
|
+
value: { type: "unit", value: 40, unit: "px" },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const mr40px: Styles[number] = {
|
|
40
|
+
property: "marginRight",
|
|
41
|
+
value: { type: "unit", value: 40, unit: "px" },
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const pl40px: Styles[number] = {
|
|
45
|
+
property: "paddingLeft",
|
|
46
|
+
value: { type: "unit", value: 40, unit: "px" },
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const fontWeightBold: Styles[number] = {
|
|
50
|
+
property: "fontWeight",
|
|
51
|
+
// in browsers defined as bold
|
|
52
|
+
// though builder accepts only numeric values
|
|
53
|
+
value: { type: "keyword", value: "700" },
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const fontStyleItalic: Styles[number] = {
|
|
57
|
+
property: "fontStyle",
|
|
58
|
+
value: { type: "keyword", value: "italic" },
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const pt1px: Styles[number] = {
|
|
62
|
+
property: "paddingTop",
|
|
63
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const pr1px: Styles[number] = {
|
|
67
|
+
property: "paddingRight",
|
|
68
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const pb1px: Styles[number] = {
|
|
72
|
+
property: "paddingBottom",
|
|
73
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const pl1px: Styles[number] = {
|
|
77
|
+
property: "paddingLeft",
|
|
78
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/* blocks */
|
|
82
|
+
|
|
83
|
+
export const article: Styles = [displayBlock];
|
|
84
|
+
export {
|
|
85
|
+
article as aside,
|
|
86
|
+
article as details,
|
|
87
|
+
article as div,
|
|
88
|
+
article as dt,
|
|
89
|
+
article as figcaption,
|
|
90
|
+
article as footer,
|
|
91
|
+
article as form,
|
|
92
|
+
article as header,
|
|
93
|
+
article as hgroup,
|
|
94
|
+
article as html,
|
|
95
|
+
article as main,
|
|
96
|
+
article as nav,
|
|
97
|
+
article as section,
|
|
98
|
+
article as summary,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const body: Styles = [
|
|
102
|
+
displayBlock,
|
|
103
|
+
{
|
|
104
|
+
property: "marginTop",
|
|
105
|
+
value: { type: "unit", value: 8, unit: "px" },
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
property: "marginRight",
|
|
109
|
+
value: { type: "unit", value: 8, unit: "px" },
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
property: "marginBottom",
|
|
113
|
+
value: { type: "unit", value: 8, unit: "px" },
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
property: "marginLeft",
|
|
117
|
+
value: { type: "unit", value: 8, unit: "px" },
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
export const p: Styles = [displayBlock, mt1em, mb1em];
|
|
122
|
+
export { p as dl };
|
|
123
|
+
|
|
124
|
+
export const dd: Styles = [displayBlock, ml40px];
|
|
125
|
+
|
|
126
|
+
export const blockquote: Styles = [displayBlock, mt1em, mb1em, ml40px, mr40px];
|
|
127
|
+
export { blockquote as figure };
|
|
128
|
+
|
|
129
|
+
export const address: Styles = [displayBlock, fontStyleItalic];
|
|
130
|
+
|
|
131
|
+
// h1 font-size, margin-top and margin-bottom depend on outer tags
|
|
132
|
+
// so better define statically in preset styles
|
|
133
|
+
export const h1: Styles = [
|
|
134
|
+
displayBlock,
|
|
135
|
+
fontWeightBold,
|
|
136
|
+
{
|
|
137
|
+
property: "fontSize",
|
|
138
|
+
value: { type: "unit", value: 2, unit: "em" },
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
property: "marginTop",
|
|
142
|
+
value: { type: "unit", value: 0.67, unit: "em" },
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
property: "marginBottom",
|
|
146
|
+
value: { type: "unit", value: 0.67, unit: "em" },
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
|
|
150
|
+
export const h2: Styles = [
|
|
151
|
+
displayBlock,
|
|
152
|
+
fontWeightBold,
|
|
153
|
+
{
|
|
154
|
+
property: "fontSize",
|
|
155
|
+
value: { type: "unit", value: 1.5, unit: "em" },
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
property: "marginTop",
|
|
159
|
+
value: { type: "unit", value: 0.83, unit: "em" },
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
property: "marginBottom",
|
|
163
|
+
value: { type: "unit", value: 0.83, unit: "em" },
|
|
164
|
+
},
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
export const h3: Styles = [
|
|
168
|
+
displayBlock,
|
|
169
|
+
fontWeightBold,
|
|
170
|
+
{
|
|
171
|
+
property: "fontSize",
|
|
172
|
+
value: { type: "unit", value: 1.17, unit: "em" },
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
property: "marginTop",
|
|
176
|
+
value: { type: "unit", value: 1, unit: "em" },
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
property: "marginBottom",
|
|
180
|
+
value: { type: "unit", value: 1, unit: "em" },
|
|
181
|
+
},
|
|
182
|
+
];
|
|
183
|
+
|
|
184
|
+
export const h4: Styles = [
|
|
185
|
+
displayBlock,
|
|
186
|
+
fontWeightBold,
|
|
187
|
+
{
|
|
188
|
+
property: "marginTop",
|
|
189
|
+
value: { type: "unit", value: 1.33, unit: "em" },
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
property: "marginBottom",
|
|
193
|
+
value: { type: "unit", value: 1.33, unit: "em" },
|
|
194
|
+
},
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
export const h5: Styles = [
|
|
198
|
+
displayBlock,
|
|
199
|
+
fontWeightBold,
|
|
200
|
+
{
|
|
201
|
+
property: "fontSize",
|
|
202
|
+
value: { type: "unit", value: 0.83, unit: "em" },
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
property: "marginTop",
|
|
206
|
+
value: { type: "unit", value: 1.67, unit: "em" },
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
property: "marginBottom",
|
|
210
|
+
value: { type: "unit", value: 1.67, unit: "em" },
|
|
211
|
+
},
|
|
212
|
+
];
|
|
213
|
+
|
|
214
|
+
export const h6: Styles = [
|
|
215
|
+
displayBlock,
|
|
216
|
+
fontWeightBold,
|
|
217
|
+
{
|
|
218
|
+
property: "fontSize",
|
|
219
|
+
value: { type: "unit", value: 0.67, unit: "em" },
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
property: "marginTop",
|
|
223
|
+
value: { type: "unit", value: 2.33, unit: "em" },
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
property: "marginBottom",
|
|
227
|
+
value: { type: "unit", value: 2.33, unit: "em" },
|
|
228
|
+
},
|
|
229
|
+
];
|
|
230
|
+
|
|
231
|
+
export const pre: Styles = [
|
|
232
|
+
displayBlock,
|
|
233
|
+
{
|
|
234
|
+
property: "whiteSpace",
|
|
235
|
+
value: { type: "keyword", value: "pre" },
|
|
236
|
+
},
|
|
237
|
+
mt1em,
|
|
238
|
+
mb1em,
|
|
239
|
+
];
|
|
240
|
+
|
|
241
|
+
/* tables */
|
|
242
|
+
|
|
243
|
+
export const table: Styles = [
|
|
244
|
+
{
|
|
245
|
+
property: "display",
|
|
246
|
+
value: { type: "keyword", value: "table" },
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
property: "borderSpacing",
|
|
250
|
+
value: { type: "unit", value: 2, unit: "px" },
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
property: "borderCollapse",
|
|
254
|
+
value: { type: "keyword", value: "separate" },
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
property: "boxSizing",
|
|
258
|
+
value: { type: "keyword", value: "border-box" },
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
property: "borderSpacing",
|
|
262
|
+
value: { type: "unit", value: 0, unit: "number" },
|
|
263
|
+
},
|
|
264
|
+
];
|
|
265
|
+
|
|
266
|
+
export const caption: Styles = [
|
|
267
|
+
{
|
|
268
|
+
property: "display",
|
|
269
|
+
value: { type: "keyword", value: "table" },
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
property: "textAlign",
|
|
273
|
+
value: { type: "keyword", value: "center" },
|
|
274
|
+
},
|
|
275
|
+
];
|
|
276
|
+
|
|
277
|
+
export const tr: Styles = [
|
|
278
|
+
{
|
|
279
|
+
property: "display",
|
|
280
|
+
value: { type: "keyword", value: "table-row" },
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
property: "verticalAlign",
|
|
284
|
+
value: { type: "keyword", value: "inherit" },
|
|
285
|
+
},
|
|
286
|
+
];
|
|
287
|
+
|
|
288
|
+
export const col: Styles = [
|
|
289
|
+
{
|
|
290
|
+
property: "display",
|
|
291
|
+
value: { type: "keyword", value: "table-column" },
|
|
292
|
+
},
|
|
293
|
+
];
|
|
294
|
+
|
|
295
|
+
export const colgroup: Styles = [
|
|
296
|
+
{
|
|
297
|
+
property: "display",
|
|
298
|
+
value: { type: "keyword", value: "table-column-group" },
|
|
299
|
+
},
|
|
300
|
+
];
|
|
301
|
+
|
|
302
|
+
export const tbody: Styles = [
|
|
303
|
+
{
|
|
304
|
+
property: "display",
|
|
305
|
+
value: { type: "keyword", value: "table-row-group" },
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
property: "verticalAlign",
|
|
309
|
+
value: { type: "keyword", value: "middle" },
|
|
310
|
+
},
|
|
311
|
+
];
|
|
312
|
+
|
|
313
|
+
export const thead: Styles = [
|
|
314
|
+
{
|
|
315
|
+
property: "display",
|
|
316
|
+
value: { type: "keyword", value: "table-header-group" },
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
property: "verticalAlign",
|
|
320
|
+
value: { type: "keyword", value: "middle" },
|
|
321
|
+
},
|
|
322
|
+
];
|
|
323
|
+
|
|
324
|
+
export const tfoot: Styles = [
|
|
325
|
+
{
|
|
326
|
+
property: "display",
|
|
327
|
+
value: { type: "keyword", value: "table-footer-group" },
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
property: "verticalAlign",
|
|
331
|
+
value: { type: "keyword", value: "middle" },
|
|
332
|
+
},
|
|
333
|
+
];
|
|
334
|
+
|
|
335
|
+
export const td: Styles = [
|
|
336
|
+
{
|
|
337
|
+
property: "display",
|
|
338
|
+
value: { type: "keyword", value: "table-cell" },
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
property: "verticalAlign",
|
|
342
|
+
value: { type: "keyword", value: "inherit" },
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
property: "textAlign",
|
|
346
|
+
value: { type: "keyword", value: "unset" },
|
|
347
|
+
},
|
|
348
|
+
pt1px,
|
|
349
|
+
pr1px,
|
|
350
|
+
pb1px,
|
|
351
|
+
pl1px,
|
|
352
|
+
];
|
|
353
|
+
|
|
354
|
+
export const th: Styles = [
|
|
355
|
+
{
|
|
356
|
+
property: "display",
|
|
357
|
+
value: { type: "keyword", value: "table-cell" },
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
property: "verticalAlign",
|
|
361
|
+
value: { type: "keyword", value: "inherit" },
|
|
362
|
+
},
|
|
363
|
+
fontWeightBold,
|
|
364
|
+
pt1px,
|
|
365
|
+
pr1px,
|
|
366
|
+
pb1px,
|
|
367
|
+
pl1px,
|
|
368
|
+
];
|
|
369
|
+
|
|
370
|
+
/* inlines */
|
|
371
|
+
|
|
372
|
+
export const b: Styles = [
|
|
373
|
+
// in firefox defined as bolder
|
|
374
|
+
fontWeightBold,
|
|
375
|
+
];
|
|
376
|
+
export { b as strong };
|
|
377
|
+
|
|
378
|
+
export const i: Styles = [fontStyleItalic];
|
|
379
|
+
export { i as cite, i as em, i as var, i as dfn };
|
|
380
|
+
|
|
381
|
+
export const code: Styles = [
|
|
382
|
+
{
|
|
383
|
+
property: "fontFamily",
|
|
384
|
+
// in firefox defined as -moz-fixed
|
|
385
|
+
value: { type: "fontFamily", value: ["monospace"] },
|
|
386
|
+
},
|
|
387
|
+
];
|
|
388
|
+
export { code as kbd, code as samp };
|
|
389
|
+
|
|
390
|
+
export const mark: Styles = [
|
|
391
|
+
{
|
|
392
|
+
property: "backgroundColor",
|
|
393
|
+
// in firefox defined as Mark
|
|
394
|
+
value: { type: "keyword", value: "yellow" },
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
property: "color",
|
|
398
|
+
// in firefox defined as MarkText
|
|
399
|
+
value: { type: "keyword", value: "black" },
|
|
400
|
+
},
|
|
401
|
+
];
|
|
402
|
+
|
|
403
|
+
export const u: Styles = [
|
|
404
|
+
{
|
|
405
|
+
property: "textDecorationStyle",
|
|
406
|
+
value: { type: "keyword", value: "underline" },
|
|
407
|
+
},
|
|
408
|
+
];
|
|
409
|
+
export { u as ins };
|
|
410
|
+
|
|
411
|
+
export const s: Styles = [
|
|
412
|
+
{
|
|
413
|
+
property: "textDecorationStyle",
|
|
414
|
+
value: { type: "keyword", value: "line-through" },
|
|
415
|
+
},
|
|
416
|
+
];
|
|
417
|
+
export { s as del };
|
|
418
|
+
|
|
419
|
+
export const sub: Styles = [
|
|
420
|
+
{
|
|
421
|
+
property: "verticalAlign",
|
|
422
|
+
value: { type: "keyword", value: "sub" },
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
property: "fontSize",
|
|
426
|
+
value: { type: "keyword", value: "smaller" },
|
|
427
|
+
},
|
|
428
|
+
];
|
|
429
|
+
|
|
430
|
+
export const sup: Styles = [
|
|
431
|
+
{
|
|
432
|
+
property: "verticalAlign",
|
|
433
|
+
value: { type: "keyword", value: "super" },
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
property: "fontSize",
|
|
437
|
+
value: { type: "keyword", value: "smaller" },
|
|
438
|
+
},
|
|
439
|
+
];
|
|
440
|
+
|
|
441
|
+
/* lists */
|
|
442
|
+
|
|
443
|
+
// nested lists have no top/bottom margins
|
|
444
|
+
// so better redefine statically in preset
|
|
445
|
+
export const ul: Styles = [
|
|
446
|
+
displayBlock,
|
|
447
|
+
{
|
|
448
|
+
property: "listStyleType",
|
|
449
|
+
value: { type: "keyword", value: "disc" },
|
|
450
|
+
},
|
|
451
|
+
mt1em,
|
|
452
|
+
mb1em,
|
|
453
|
+
pl40px,
|
|
454
|
+
];
|
|
455
|
+
|
|
456
|
+
export const ol: Styles = [
|
|
457
|
+
displayBlock,
|
|
458
|
+
{
|
|
459
|
+
property: "listStyleType",
|
|
460
|
+
value: { type: "keyword", value: "decimal" },
|
|
461
|
+
},
|
|
462
|
+
mt1em,
|
|
463
|
+
mb1em,
|
|
464
|
+
pl40px,
|
|
465
|
+
];
|
|
466
|
+
|
|
467
|
+
export const li: Styles = [
|
|
468
|
+
{
|
|
469
|
+
property: "display",
|
|
470
|
+
value: { type: "keyword", value: "list-item" },
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
property: "textAlign",
|
|
474
|
+
value: { type: "keyword", value: "match-parent" },
|
|
475
|
+
},
|
|
476
|
+
];
|
|
477
|
+
|
|
478
|
+
/* leafs */
|
|
479
|
+
|
|
480
|
+
export const hr: Styles = [
|
|
481
|
+
{
|
|
482
|
+
property: "color",
|
|
483
|
+
value: { type: "keyword", value: "gray" },
|
|
484
|
+
},
|
|
485
|
+
|
|
486
|
+
{
|
|
487
|
+
property: "borderTopWidth",
|
|
488
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
property: "borderRightWidth",
|
|
492
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
property: "borderBottomWidth",
|
|
496
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
property: "borderLeftWidth",
|
|
500
|
+
value: { type: "unit", value: 1, unit: "px" },
|
|
501
|
+
},
|
|
502
|
+
|
|
503
|
+
{
|
|
504
|
+
property: "borderTopStyle",
|
|
505
|
+
value: { type: "keyword", value: "inset" },
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
property: "borderRightStyle",
|
|
509
|
+
value: { type: "keyword", value: "inset" },
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
property: "borderBottomStyle",
|
|
513
|
+
value: { type: "keyword", value: "inset" },
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
property: "borderLeftStyle",
|
|
517
|
+
value: { type: "keyword", value: "inset" },
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
{
|
|
521
|
+
property: "marginTop",
|
|
522
|
+
value: { type: "unit", value: 0.5, unit: "em" },
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
property: "marginBottom",
|
|
526
|
+
value: { type: "unit", value: 0.5, unit: "em" },
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
property: "marginLeft",
|
|
530
|
+
value: { type: "keyword", value: "auto" },
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
property: "marginRight",
|
|
534
|
+
value: { type: "keyword", value: "auto" },
|
|
535
|
+
},
|
|
536
|
+
|
|
537
|
+
// firefox only
|
|
538
|
+
{
|
|
539
|
+
property: "overflow",
|
|
540
|
+
value: { type: "keyword", value: "hidden" },
|
|
541
|
+
},
|
|
542
|
+
|
|
543
|
+
/* This is not really per spec but all browsers define it */
|
|
544
|
+
displayBlock,
|
|
545
|
+
];
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
import type { WritableDeep } from "type-fest";
|
|
2
|
+
import type { Html } from "./html";
|
|
3
|
+
import * as exportedHtml from "./html";
|
|
4
|
+
export const html: Html = exportedHtml;
|
|
5
|
+
|
|
1
6
|
export * from "./__generated__/keyword-values";
|
|
2
|
-
export * from "./__generated__/properties";
|
|
3
7
|
export * from "./__generated__/units";
|
|
4
8
|
export * from "./schema";
|
|
9
|
+
|
|
10
|
+
import { properties as generatedProperties } from "./__generated__/properties";
|
|
11
|
+
|
|
12
|
+
// convert to writable to avoid conflicts with schema type
|
|
13
|
+
export const properties = generatedProperties as WritableDeep<
|
|
14
|
+
typeof generatedProperties
|
|
15
|
+
>;
|