@webref/css 5.4.4 → 6.0.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/CHANGELOG.md +66 -0
- package/CSS.json +416 -21
- package/README.md +4 -4
- package/SVG.json +42 -35
- package/compat.json +111 -75
- package/compositing.json +101 -12
- package/css-align.json +237 -29
- package/css-anchor.json +177 -19
- package/css-animations-2.json +37 -15
- package/css-animations.json +155 -31
- package/css-backgrounds-4.json +107 -32
- package/css-backgrounds.json +426 -59
- package/css-box.json +243 -20
- package/css-break.json +292 -11
- package/css-cascade-6.json +22 -13
- package/css-cascade.json +50 -15
- package/css-color-5.json +320 -35
- package/css-color-adjust.json +75 -8
- package/css-color.json +1100 -61
- package/css-conditional-4.json +11 -6
- package/css-conditional-5.json +38 -19
- package/css-conditional.json +28 -15
- package/css-contain-3.json +101 -26
- package/css-contain.json +71 -6
- package/css-content.json +263 -30
- package/css-counter-styles.json +455 -18
- package/css-display.json +250 -19
- package/css-easing.json +137 -25
- package/css-env.json +61 -6
- package/css-exclusions.json +65 -6
- package/css-extensions.json +20 -12
- package/css-flexbox.json +132 -11
- package/css-fonts-5.json +255 -13
- package/css-fonts.json +886 -74
- package/css-gcpm-4.json +30 -5
- package/css-gcpm.json +76 -15
- package/css-grid-3.json +10 -9
- package/css-grid.json +442 -42
- package/css-highlight-api.json +13 -5
- package/css-images-4.json +192 -67
- package/css-images.json +152 -33
- package/css-inline.json +525 -16
- package/css-layout-api.json +20 -0
- package/css-line-grid.json +80 -7
- package/css-lists.json +140 -19
- package/css-logical.json +125 -50
- package/css-masking.json +330 -47
- package/css-multicol-2.json +32 -5
- package/css-multicol.json +84 -13
- package/css-namespaces.json +15 -10
- package/css-nav.json +62 -7
- package/css-nesting.json +15 -0
- package/css-overflow-4.json +83 -10
- package/css-overflow.json +239 -18
- package/css-overscroll.json +110 -9
- package/css-page-floats.json +188 -16
- package/css-page.json +262 -67
- package/css-paint-api.json +8 -5
- package/css-position.json +269 -16
- package/css-properties-values-api.json +9 -7
- package/css-pseudo.json +67 -0
- package/css-regions.json +8 -7
- package/css-rhythm.json +69 -10
- package/css-round-display.json +47 -10
- package/css-ruby.json +136 -8
- package/css-scoping.json +27 -0
- package/css-scroll-anchoring.json +20 -5
- package/css-scroll-snap-2.json +272 -10
- package/css-scroll-snap.json +218 -29
- package/css-scrollbars.json +41 -6
- package/css-shadow-parts.json +8 -5
- package/css-shapes-2.json +190 -43
- package/css-shapes.json +130 -36
- package/css-size-adjust.json +26 -5
- package/css-sizing-4.json +404 -23
- package/css-sizing.json +231 -12
- package/css-speech.json +619 -35
- package/css-syntax.json +193 -92
- package/css-tables.json +10 -9
- package/css-text-4.json +800 -40
- package/css-text-decor-4.json +394 -23
- package/css-text-decor.json +159 -14
- package/css-text.json +371 -20
- package/css-transforms-2.json +177 -40
- package/css-transforms.json +137 -45
- package/css-transitions.json +33 -14
- package/css-ui.json +436 -42
- package/css-values-5.json +99 -14
- package/css-values.json +653 -146
- package/css-variables.json +12 -7
- package/css-view-transitions.json +45 -7
- package/css-will-change.json +36 -7
- package/css-writing-modes.json +141 -10
- package/fill-stroke.json +290 -35
- package/filter-effects-2.json +6 -5
- package/filter-effects.json +109 -45
- package/fullscreen.json +15 -0
- package/mathml-core.json +10 -9
- package/mediaqueries-5.json +505 -52
- package/mediaqueries.json +307 -40
- package/motion.json +99 -16
- package/package.json +1 -1
- package/scroll-animations.json +225 -24
- package/selectors.json +368 -30
- package/svg-strokes.json +8 -7
- package/upgrade-insecure-requests.json +26 -0
- package/html.json +0 -19
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
This file documents breaking changes introduced in major releases of the
|
|
4
|
+
`@webref/css` NPM package.
|
|
5
|
+
|
|
6
|
+
Webref adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|
7
|
+
applied to data. A new major version is released whenever a breaking change is
|
|
8
|
+
made to the data structure.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## v6.0.0 - 2022-11-28
|
|
12
|
+
|
|
13
|
+
Major re-write of CSS extracts listed in the package, following the release
|
|
14
|
+
of [Reffy v11.0.0](https://github.com/w3c/reffy/blob/main/CHANGELOG.md#v1100---2022-11-28)
|
|
15
|
+
|
|
16
|
+
### Breaking changes
|
|
17
|
+
|
|
18
|
+
- Arrays are now used throughout instead of indexed objects.
|
|
19
|
+
- Function names are no longer enclosed in `<` and `>` because they are not
|
|
20
|
+
defined in specs with these characters (as opposed to types). Beware though,
|
|
21
|
+
references to functions in value syntax do use enclosing `<` and `>` characters.
|
|
22
|
+
- The property `valuespaces` at the root level is now named `values`. An array
|
|
23
|
+
is used there as well. The `values` property lists both `function` and `type`
|
|
24
|
+
definitions that are not namespaced to anything in particular (it used to also
|
|
25
|
+
contain namespaced definitions).
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- Selectors are now reported under a `selectors` property at the root level.
|
|
30
|
+
- Possible values that some definition may take are now reported under a
|
|
31
|
+
`values` property directly within the definition.
|
|
32
|
+
- Functions and types that are namespaced to some other definition are included
|
|
33
|
+
in the list of `values` of that definition.
|
|
34
|
+
- Anomalies detected in the spec are now reported under a `warnings` property at
|
|
35
|
+
the root of the extract. Four types of anomalies are reported:
|
|
36
|
+
1. **Missing definition**: when a production rule was found but when the spec
|
|
37
|
+
does not include a corresponding `<dfn>` (or when that `<dfn>` does not have a
|
|
38
|
+
`data-dfn-type` attribute that identifies a CSS construct)
|
|
39
|
+
2. **Duplicate definition**: when the spec defines the same term twice.
|
|
40
|
+
3. **Unmergeable definition**: when the spec defines the same property twice
|
|
41
|
+
and both definitions cannot be merged.
|
|
42
|
+
4. **Dangling value**: when the spec defines a CSS "value" definition
|
|
43
|
+
(`value`, `function` or `type`) for something and that something cannot be
|
|
44
|
+
found in the spec
|
|
45
|
+
- To distinguish between `function`, `type` and `value` definitions listed in a
|
|
46
|
+
`values` property, definitions that appear in a `values` property have a `type`
|
|
47
|
+
property.
|
|
48
|
+
|
|
49
|
+
### Additional notes
|
|
50
|
+
|
|
51
|
+
- Only namespaced values associated with a definition are listed under its
|
|
52
|
+
`values` property. Non-namespaced values are not. For instance, `<quote>` is not
|
|
53
|
+
listed as a value of the `<content-list>` type, even though its value syntax
|
|
54
|
+
references it. This is to avoid duplicating constructs in the extracts.
|
|
55
|
+
- Values are only listed under the deepest definition to which they apply. For
|
|
56
|
+
instance, `open-quote` is only listed as a value of `<quote>` but neither as a
|
|
57
|
+
value of the `<content-list>` type that references `<quote>` nor as a value of
|
|
58
|
+
the `content` property that references `<content-list>`. This is also to avoid
|
|
59
|
+
duplicating constructs in the extracts.
|
|
60
|
+
- Some of the extracts contain things that may look weird at first, but that is
|
|
61
|
+
"by design". For instance, [CSS Will
|
|
62
|
+
change](https://drafts.csswg.org/css-will-change-1/) defines a
|
|
63
|
+
[`<custom-ident>`](https://drafts.csswg.org/css-will-change-1/#valdef-will-change-custom-ident)
|
|
64
|
+
`value` construct whose actual value is the `<custom-ident>` `type` construct
|
|
65
|
+
defined in CSS Values. Having both a namespaced `value` and a non-namespaced
|
|
66
|
+
`<type>` is somewhat common in CSS specs.
|
package/CSS.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"title": "CSS 2",
|
|
4
4
|
"url": "https://drafts.csswg.org/css2/"
|
|
5
5
|
},
|
|
6
|
-
"properties":
|
|
7
|
-
|
|
6
|
+
"properties": [
|
|
7
|
+
{
|
|
8
8
|
"name": "z-index",
|
|
9
9
|
"value": "auto | <integer> | inherit",
|
|
10
10
|
"initial": "auto",
|
|
@@ -14,12 +14,20 @@
|
|
|
14
14
|
"computedValue": "as specified",
|
|
15
15
|
"canonicalOrder": "per grammar",
|
|
16
16
|
"media": "visual",
|
|
17
|
+
"values": [
|
|
18
|
+
{
|
|
19
|
+
"name": "auto",
|
|
20
|
+
"prose": "The stack level of the generated box in the current stacking context is 0. The box does not establish a new stacking context unless it is the root element.",
|
|
21
|
+
"type": "value",
|
|
22
|
+
"value": "auto"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
17
25
|
"styleDeclaration": [
|
|
18
26
|
"z-index",
|
|
19
27
|
"zIndex"
|
|
20
28
|
]
|
|
21
29
|
},
|
|
22
|
-
|
|
30
|
+
{
|
|
23
31
|
"name": "page-break-before",
|
|
24
32
|
"value": "auto | always | avoid | left | right | inherit",
|
|
25
33
|
"initial": "auto",
|
|
@@ -29,12 +37,44 @@
|
|
|
29
37
|
"computedValue": "as specified",
|
|
30
38
|
"canonicalOrder": "per grammar",
|
|
31
39
|
"media": "visual, paged",
|
|
40
|
+
"values": [
|
|
41
|
+
{
|
|
42
|
+
"name": "auto",
|
|
43
|
+
"prose": "Neither force nor forbid a page break before (after, inside) the generated box.",
|
|
44
|
+
"type": "value",
|
|
45
|
+
"value": "auto"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "always",
|
|
49
|
+
"prose": "Always force a page break before (after) the generated box.",
|
|
50
|
+
"type": "value",
|
|
51
|
+
"value": "always"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "avoid",
|
|
55
|
+
"prose": "Avoid a page break before (after, inside) the generated box.",
|
|
56
|
+
"type": "value",
|
|
57
|
+
"value": "avoid"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "left",
|
|
61
|
+
"prose": "Force one or two page breaks before (after) the generated box so that the next page is formatted as a left page.",
|
|
62
|
+
"type": "value",
|
|
63
|
+
"value": "left"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "right",
|
|
67
|
+
"prose": "Force one or two page breaks before (after) the generated box so that the next page is formatted as a right page.",
|
|
68
|
+
"type": "value",
|
|
69
|
+
"value": "right"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
32
72
|
"styleDeclaration": [
|
|
33
73
|
"page-break-before",
|
|
34
74
|
"pageBreakBefore"
|
|
35
75
|
]
|
|
36
76
|
},
|
|
37
|
-
|
|
77
|
+
{
|
|
38
78
|
"name": "page-break-after",
|
|
39
79
|
"value": "auto | always | avoid | left | right | inherit",
|
|
40
80
|
"initial": "auto",
|
|
@@ -44,12 +84,44 @@
|
|
|
44
84
|
"computedValue": "as specified",
|
|
45
85
|
"canonicalOrder": "per grammar",
|
|
46
86
|
"media": "visual, paged",
|
|
87
|
+
"values": [
|
|
88
|
+
{
|
|
89
|
+
"name": "auto",
|
|
90
|
+
"prose": "Neither force nor forbid a page break before (after, inside) the generated box.",
|
|
91
|
+
"type": "value",
|
|
92
|
+
"value": "auto"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "always",
|
|
96
|
+
"prose": "Always force a page break before (after) the generated box.",
|
|
97
|
+
"type": "value",
|
|
98
|
+
"value": "always"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "avoid",
|
|
102
|
+
"prose": "Avoid a page break before (after, inside) the generated box.",
|
|
103
|
+
"type": "value",
|
|
104
|
+
"value": "avoid"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "left",
|
|
108
|
+
"prose": "Force one or two page breaks before (after) the generated box so that the next page is formatted as a left page.",
|
|
109
|
+
"type": "value",
|
|
110
|
+
"value": "left"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "right",
|
|
114
|
+
"prose": "Force one or two page breaks before (after) the generated box so that the next page is formatted as a right page.",
|
|
115
|
+
"type": "value",
|
|
116
|
+
"value": "right"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
47
119
|
"styleDeclaration": [
|
|
48
120
|
"page-break-after",
|
|
49
121
|
"pageBreakAfter"
|
|
50
122
|
]
|
|
51
123
|
},
|
|
52
|
-
|
|
124
|
+
{
|
|
53
125
|
"name": "page-break-inside",
|
|
54
126
|
"value": "avoid | auto | inherit",
|
|
55
127
|
"initial": "auto",
|
|
@@ -59,31 +131,354 @@
|
|
|
59
131
|
"computedValue": "as specified",
|
|
60
132
|
"canonicalOrder": "per grammar",
|
|
61
133
|
"media": "visual, paged",
|
|
134
|
+
"values": [
|
|
135
|
+
{
|
|
136
|
+
"name": "auto",
|
|
137
|
+
"prose": "Neither force nor forbid a page break before (after, inside) the generated box.",
|
|
138
|
+
"type": "value",
|
|
139
|
+
"value": "auto"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "always",
|
|
143
|
+
"prose": "Always force a page break before (after) the generated box.",
|
|
144
|
+
"type": "value",
|
|
145
|
+
"value": "always"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "avoid",
|
|
149
|
+
"prose": "Avoid a page break before (after, inside) the generated box.",
|
|
150
|
+
"type": "value",
|
|
151
|
+
"value": "avoid"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "left",
|
|
155
|
+
"prose": "Force one or two page breaks before (after) the generated box so that the next page is formatted as a left page.",
|
|
156
|
+
"type": "value",
|
|
157
|
+
"value": "left"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "right",
|
|
161
|
+
"prose": "Force one or two page breaks before (after) the generated box so that the next page is formatted as a right page.",
|
|
162
|
+
"type": "value",
|
|
163
|
+
"value": "right"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
62
166
|
"styleDeclaration": [
|
|
63
167
|
"page-break-inside",
|
|
64
168
|
"pageBreakInside"
|
|
65
169
|
]
|
|
66
170
|
}
|
|
67
|
-
|
|
68
|
-
"atrules":
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"prose": "
|
|
171
|
+
],
|
|
172
|
+
"atrules": [
|
|
173
|
+
{
|
|
174
|
+
"name": "@import",
|
|
175
|
+
"prose": "The @import rule allows users to import style rules from other style sheets. In CSS 2, any @import rules must precede all other rules (except the @charset rule, if present). See the section on parsing for when user agents must ignore @import rules. The @import keyword must be followed by the URI of the style sheet to include. A string is also allowed; it will be interpreted as if it had url(...) around it.",
|
|
176
|
+
"descriptors": []
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "@media",
|
|
180
|
+
"descriptors": [],
|
|
181
|
+
"values": [
|
|
182
|
+
{
|
|
183
|
+
"name": "all",
|
|
184
|
+
"prose": "Suitable for all devices.",
|
|
185
|
+
"type": "value",
|
|
186
|
+
"value": "all",
|
|
187
|
+
"values": [
|
|
188
|
+
{
|
|
189
|
+
"name": "inherit",
|
|
190
|
+
"type": "value",
|
|
191
|
+
"value": "inherit"
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "braille",
|
|
197
|
+
"prose": "Intended for braille tactile feedback devices.",
|
|
198
|
+
"type": "value",
|
|
199
|
+
"value": "braille"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "embossed",
|
|
203
|
+
"prose": "Intended for paged braille printers.",
|
|
204
|
+
"type": "value",
|
|
205
|
+
"value": "embossed"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "handheld",
|
|
209
|
+
"prose": "Intended for handheld devices (typically small screen, limited bandwidth).",
|
|
210
|
+
"type": "value",
|
|
211
|
+
"value": "handheld"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "print",
|
|
215
|
+
"prose": "Intended for paged material and for documents viewed on screen in print preview mode. Please consult the section on paged media for information about formatting issues that are specific to paged media.",
|
|
216
|
+
"type": "value",
|
|
217
|
+
"value": "print"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "projection",
|
|
221
|
+
"prose": "Intended for projected presentations, for example projectors. Please consult the section on paged media for information about formatting issues that are specific to paged media.",
|
|
222
|
+
"type": "value",
|
|
223
|
+
"value": "projection"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "screen",
|
|
227
|
+
"prose": "Intended primarily for color computer screens.",
|
|
228
|
+
"type": "value",
|
|
229
|
+
"value": "screen"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "speech",
|
|
233
|
+
"prose": "Intended for speech synthesizers. Note: CSS2 (1998) had a similar media type called aural for this purpose.",
|
|
234
|
+
"type": "value",
|
|
235
|
+
"value": "speech"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "tty",
|
|
239
|
+
"prose": "Intended for media using a fixed-pitch character grid (such as teletypes, terminals, or portable devices with limited display capabilities). Authors should not use pixel units with the \"tty\" media type.",
|
|
240
|
+
"type": "value",
|
|
241
|
+
"value": "tty"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "tv",
|
|
245
|
+
"prose": "Intended for television-type devices (low resolution, color, limited-scrollability screens, sound available).",
|
|
246
|
+
"type": "value",
|
|
247
|
+
"value": "tv"
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "@page",
|
|
253
|
+
"prose": "Authors can specify the margins of a page box inside an @page rule. An @page rule consists of the keyword \"@page\", followed by an optional page selector, followed by a block containing declarations and at-rules. Comments and white space are allowed, but optional, between the @page token and the page selector and between the page selector and the block. The declarations in an @page rule are said to be in the page context.",
|
|
254
|
+
"descriptors": []
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"selectors": [
|
|
258
|
+
{
|
|
259
|
+
"name": ":lang"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": ":first-line"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": ":first-letter"
|
|
72
266
|
},
|
|
73
|
-
|
|
74
|
-
"
|
|
267
|
+
{
|
|
268
|
+
"name": ":before"
|
|
75
269
|
},
|
|
76
|
-
|
|
77
|
-
"
|
|
270
|
+
{
|
|
271
|
+
"name": ":after"
|
|
78
272
|
},
|
|
79
|
-
|
|
80
|
-
"
|
|
273
|
+
{
|
|
274
|
+
"name": ":left",
|
|
275
|
+
"prose": "All pages are automatically classified by user agents into either the :left or :right pseudo-class. Whether the first page of a document is :left or :right depends on the major writing direction of the root element. For example, the first page of a document with a left-to-right major writing direction would be a :right page, and the first page of a document with a right-to-left major writing direction would be a :left page. To explicitly force a document to begin printing on a left or right page, authors can insert a page break before the first generated box."
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": ":right",
|
|
279
|
+
"prose": "All pages are automatically classified by user agents into either the :left or :right pseudo-class. Whether the first page of a document is :left or :right depends on the major writing direction of the root element. For example, the first page of a document with a left-to-right major writing direction would be a :right page, and the first page of a document with a right-to-left major writing direction would be a :left page. To explicitly force a document to begin printing on a left or right page, authors can insert a page break before the first generated box."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": ":first",
|
|
283
|
+
"prose": "Authors may also specify style for the first page of a document with the :first pseudo-class:"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"values": [
|
|
287
|
+
{
|
|
288
|
+
"name": "<identifier>",
|
|
289
|
+
"type": "type"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "<uri>",
|
|
293
|
+
"prose": "URI values (Uniform Resource Identifiers, see [RFC3986], which includes URLs, URNs, etc) in this specification are denoted by <uri>. The functional notation used to designate URIs in property values is \"url()\", as in:",
|
|
294
|
+
"type": "type"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "<margin-width>",
|
|
298
|
+
"prose": "The properties defined in this section refer to the <margin-width> value type, which may take one of the following values:",
|
|
299
|
+
"type": "type"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "<padding-width>",
|
|
303
|
+
"prose": "The properties defined in this section refer to the <padding-width> value type, which may take one of the following values:",
|
|
304
|
+
"type": "type",
|
|
305
|
+
"values": [
|
|
306
|
+
{
|
|
307
|
+
"name": "<length>",
|
|
308
|
+
"prose": "Specifies a fixed width.",
|
|
309
|
+
"type": "value",
|
|
310
|
+
"value": "<length>"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "<percentage>",
|
|
314
|
+
"prose": "The percentage is calculated with respect to the width of the generated box’s containing block, even for padding-top and padding-bottom. If the containing block’s width depends on this element, then the resulting layout is undefined in CSS 2.",
|
|
315
|
+
"type": "value",
|
|
316
|
+
"value": "<percentage>"
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "<border-width>",
|
|
322
|
+
"prose": "The border width properties specify the width of the border area. The properties defined in this section refer to the <border-width> value type, which may take one of the following values:",
|
|
323
|
+
"type": "type",
|
|
324
|
+
"values": [
|
|
325
|
+
{
|
|
326
|
+
"name": "thin",
|
|
327
|
+
"prose": "A thin border.",
|
|
328
|
+
"type": "value",
|
|
329
|
+
"value": "thin"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "medium",
|
|
333
|
+
"prose": "A medium border.",
|
|
334
|
+
"type": "value",
|
|
335
|
+
"value": "medium"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "thick",
|
|
339
|
+
"prose": "A thick border.",
|
|
340
|
+
"type": "value",
|
|
341
|
+
"value": "thick"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "<length>",
|
|
345
|
+
"prose": "The border’s thickness has an explicit value. Explicit border widths cannot be negative.",
|
|
346
|
+
"type": "value",
|
|
347
|
+
"value": "<length>"
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "<border-style>",
|
|
353
|
+
"prose": "The border style properties specify the line style of a box’s border (solid, double, dashed, etc.). The properties defined in this section refer to the <border-style> value type, which may take one of the following values:",
|
|
354
|
+
"type": "type",
|
|
355
|
+
"values": [
|
|
356
|
+
{
|
|
357
|
+
"name": "none",
|
|
358
|
+
"prose": "No border; the computed border width is zero.",
|
|
359
|
+
"type": "value",
|
|
360
|
+
"value": "none"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "hidden",
|
|
364
|
+
"prose": "Same as none, except in terms of border conflict resolution for table elements.",
|
|
365
|
+
"type": "value",
|
|
366
|
+
"value": "hidden"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "dotted",
|
|
370
|
+
"prose": "The border is a series of dots.",
|
|
371
|
+
"type": "value",
|
|
372
|
+
"value": "dotted"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "dashed",
|
|
376
|
+
"prose": "The border is a series of short line segments.",
|
|
377
|
+
"type": "value",
|
|
378
|
+
"value": "dashed"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"name": "solid",
|
|
382
|
+
"prose": "The border is a single line segment.",
|
|
383
|
+
"type": "value",
|
|
384
|
+
"value": "solid"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "double",
|
|
388
|
+
"prose": "The border is two solid lines. The sum of the two lines and the space between them equals the value of border-width.",
|
|
389
|
+
"type": "value",
|
|
390
|
+
"value": "double"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "groove",
|
|
394
|
+
"prose": "The border looks as though it were carved into the canvas.",
|
|
395
|
+
"type": "value",
|
|
396
|
+
"value": "groove"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "ridge",
|
|
400
|
+
"prose": "The opposite of groove: the border looks as though it were coming out of the canvas.",
|
|
401
|
+
"type": "value",
|
|
402
|
+
"value": "ridge"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"name": "inset",
|
|
406
|
+
"prose": "The border makes the box look as though it were embedded in the canvas.",
|
|
407
|
+
"type": "value",
|
|
408
|
+
"value": "inset"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "outset",
|
|
412
|
+
"prose": "The opposite of inset: the border makes the box look as though it were coming out of the canvas.",
|
|
413
|
+
"type": "value",
|
|
414
|
+
"value": "outset"
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "<shape>",
|
|
420
|
+
"prose": "In CSS 2, the only valid <shape> value is: rect(<top>, <right>, <bottom>, <left>) where <top> and <bottom> specify offsets from the top border edge of the box, and <right>, and <left> specify offsets from the left border edge of the box. Authors should separate offset values with commas. User agents must support separation with commas, but may also support separation without commas (but not a combination), because a previous revision of this specification was ambiguous in this respect. <top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box). When coordinates are rounded to pixel coordinates, care should be taken that no pixels remain visible when <left> and <right> have the same value (or <top> and <bottom> have the same value), and conversely that no pixels within the element’s border box remain hidden when these values are auto.",
|
|
421
|
+
"type": "type"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"name": "<top>",
|
|
425
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
426
|
+
"type": "type",
|
|
427
|
+
"values": [
|
|
428
|
+
{
|
|
429
|
+
"name": "auto",
|
|
430
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
431
|
+
"type": "value",
|
|
432
|
+
"value": "auto"
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "<right>",
|
|
438
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
439
|
+
"type": "type",
|
|
440
|
+
"values": [
|
|
441
|
+
{
|
|
442
|
+
"name": "auto",
|
|
443
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
444
|
+
"type": "value",
|
|
445
|
+
"value": "auto"
|
|
446
|
+
}
|
|
447
|
+
]
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "<bottom>",
|
|
451
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
452
|
+
"type": "type",
|
|
453
|
+
"values": [
|
|
454
|
+
{
|
|
455
|
+
"name": "auto",
|
|
456
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
457
|
+
"type": "value",
|
|
458
|
+
"value": "auto"
|
|
459
|
+
}
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "<left>",
|
|
464
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
465
|
+
"type": "type",
|
|
466
|
+
"values": [
|
|
467
|
+
{
|
|
468
|
+
"name": "auto",
|
|
469
|
+
"prose": "<top>, <right>, <bottom>, and <left> may either have a <length> value or auto. Negative lengths are permitted. The value auto means that a given edge of the clipping region will be the same as the edge of the element’s generated border box (i.e., auto means the same as 0 for <top> and <left>, the same as the used value of the height plus the sum of vertical padding and border widths for <bottom>, and the same as the used value of the width plus the sum of the horizontal padding and border widths for <right>, such that four auto values result in the clipping region being the same as the element’s border box).",
|
|
470
|
+
"type": "value",
|
|
471
|
+
"value": "auto"
|
|
472
|
+
}
|
|
473
|
+
]
|
|
81
474
|
},
|
|
82
|
-
|
|
83
|
-
"
|
|
475
|
+
{
|
|
476
|
+
"name": "<absolute-size>",
|
|
477
|
+
"type": "type"
|
|
84
478
|
},
|
|
85
|
-
|
|
86
|
-
"
|
|
479
|
+
{
|
|
480
|
+
"name": "<relative-size>",
|
|
481
|
+
"type": "type"
|
|
87
482
|
}
|
|
88
|
-
|
|
483
|
+
]
|
|
89
484
|
}
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ for (const [shortname, data] of Object.entries(parsedFiles)) {
|
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
CSS fragments that appear in the objects, in other words the contents of the `properties[].value`, `properties[].newValues`, `atrules[].value`, `atrules[].descriptors[].value` and `
|
|
18
|
+
CSS fragments that appear in the objects, in other words the contents of the `properties[].value`, `properties[].newValues`, `atrules[].value`, `atrules[].descriptors[].value`, `selectors[].value` and `values[].value` properties can be parsed with the [CSSTree Value Definition Syntax parser](https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md#value-definition-syntax). Example:
|
|
19
19
|
|
|
20
20
|
```js
|
|
21
21
|
const css = require('@webref/css');
|
|
@@ -23,10 +23,10 @@ const { definitionSyntax } = require('css-tree');
|
|
|
23
23
|
|
|
24
24
|
const parsedFiles = await css.listAll();
|
|
25
25
|
for (const [shortname, data] of Object.entries(parsedFiles)) {
|
|
26
|
-
for (const
|
|
27
|
-
if (
|
|
26
|
+
for (const property of data.properties) {
|
|
27
|
+
if (property.value) {
|
|
28
28
|
try {
|
|
29
|
-
const ast = definitionSyntax.parse(
|
|
29
|
+
const ast = definitionSyntax.parse(property.value);
|
|
30
30
|
// do something with the ast
|
|
31
31
|
}
|
|
32
32
|
catch {
|