@@ -2025,11 +2025,6 @@ Parse a stylesheet</h4>
2025
2025
<a>Consume a list of rules</a> from the stream of tokens, with the top-level flag set.
2026
2026
Let the return value be <var> rules</var> .
2027
2027
2028
- <li>
2029
- If the first rule in <var> rules</var> is an <a>at-rule</a> with a name
2030
- that is an <a>ASCII case-insensitive</a> match for "charset",
2031
- remove it from <var> rules</var> .
2032
-
2033
2028
<li>
2034
2029
Assign <var> rules</var> to the stylesheet's value.
2035
2030
@@ -3228,13 +3223,6 @@ The ''@charset'' Rule</h3>
3228
3223
any occurrences of an ''@charset'' rule must be treated as an unrecognized rule,
3229
3224
and thus dropped as invalid when the stylesheet is grammar-checked.
3230
3225
3231
- Note: The algorithm to <a>parse a stylesheet</a> explicitly drops the first ''@charset'' rule from the document,
3232
- before the stylesheet is grammar-checked,
3233
- so valid rules that must appear first in the stylesheet,
3234
- such as ''@import'' ,
3235
- can still be preceded by an (invalid) ''@charset'' rule
3236
- without making themselves invalid.
3237
-
3238
3226
Note: In CSS 2.1, ''@charset'' was a valid rule.
3239
3227
Some legacy specs may still refer to a ''@charset'' rule,
3240
3228
and explicitly talk about its presence in the stylesheet.
@@ -3447,18 +3435,23 @@ Changes from the 20 February 2014 Candidate Recommendation</h3>
3447
3435
* Fix several bugs in the tokenization and parsing algorithms.
3448
3436
3449
3437
* Change the definition of ident-like tokens to allow "--" to start an ident.
3438
+ As part of this, rearrange the ordering of the clauses in the "-" step of <a>consume a token</a>
3439
+ so that <<CDC-token>> s are recognized as such instead of becoming a ''--'' <<ident-token>> .
3450
3440
3451
3441
* Don't serialize the digit in an <<an+b>> when A is 1 or -1.
3452
3442
3453
3443
* Define all tokens to have a <a>representation</a> .
3454
3444
3455
3445
* Fixed minor bug in <a>check if two code points are a valid escape</a> --
3456
3446
a <code> \</code> followed by an EOF is now correctly reported as <em> not</em> a valid escape.
3447
+ A final <code> \</code> in a stylesheet now just emits itself as a <<delim-token>> .
3457
3448
3458
- * If the very first rule in the sheet is a ''@charset'' , dropped it during parsing.
3449
+ * @charset is no longer a valid CSS rule (there's just an encoding declaration that <em> looks </em> like a rule named @charset)
3459
3450
3460
3451
* Trimmed whitespace from the beginning/ending of a declaration's value during parsing.
3461
3452
3453
+ * Removed the Selectors-specific tokens, per WG resolution.
3454
+
3462
3455
The following editorial changes were made:
3463
3456
3464
3457
* The "Consume a string token" algorithm was changed to allow calling it without specifying an explicit ending token,
@@ -3471,8 +3464,6 @@ Changes from the 20 February 2014 Candidate Recommendation</h3>
3471
3464
3472
3465
* Added the <<declaration-value>> and <<any-value>> productions.
3473
3466
3474
- * Removed the Selectors-specific tokens, per WG resolution.
3475
-
3476
3467
* Removed "code point" and "surrogate code point" in favor of the identical definitions in the Infra Standard.
3477
3468
3478
3469
* Clarified on every range that they are inclusive.
0 commit comments