Skip to content

Commit f9743be

Browse files
committed
[css-properties-values] Rephrase the note slightly.
1 parent cbf1b79 commit f9743be

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

css-properties-values-api/Overview.bs

+6-3
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,19 @@ See [[#computed-value]].
127127
they throw away invalid properties,
128128
and if you write the same property multiple times in a single declaration block,
129129
all but the last valid one will be thrown away.
130+
(This is an important part of CSS's error-recovery
131+
and forward-compatibility behavior.)
130132

131133
This works fine if the syntax of a property never changes over the lifetime of a page.
132134
If a custom property is registered, however,
133135
it can change its syntax,
134136
so that a property that was previously invalid
135137
suddenly becomes valid.
136138

137-
The only way to handle this is to either store every declaration,
139+
The only ways to handle this are to either store every declaration,
138140
even those that were initially invalid
139141
(increasing the memory cost of pages),
140-
or re-parsing the entire page's CSS
142+
or to re-parse the entire page's CSS
141143
with the new syntax rules
142144
(increasing the processing cost of registering a custom property).
143145
Neither of these are very desirable.
@@ -149,7 +151,8 @@ See [[#computed-value]].
149151
which is the entire reason for CSS's error-recovery behavior
150152
and the practice of writing multiple declarations for varying levels of support.
151153
A custom property, on the other hand,
152-
has its syntax controlled by the page author;
154+
has its syntax controlled by the page author,
155+
according to whatever stylesheet or script they've included in the page;
153156
there's no unpredictability to be managed.
154157
Throwing away syntax-violating custom properties
155158
would thus only be, at best, a convenience for the page author,

0 commit comments

Comments
 (0)