@@ -2025,11 +2025,6 @@ Parse a stylesheet</h4>
20252025 <a>Consume a list of rules</a> from the stream of tokens, with the top-level flag set.
20262026 Let the return value be <var> rules</var> .
20272027
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-
20332028 <li>
20342029 Assign <var> rules</var> to the stylesheet's value.
20352030
@@ -3228,13 +3223,6 @@ The ''@charset'' Rule</h3>
32283223 any occurrences of an ''@charset'' rule must be treated as an unrecognized rule,
32293224 and thus dropped as invalid when the stylesheet is grammar-checked.
32303225
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-
32383226 Note: In CSS 2.1, ''@charset'' was a valid rule.
32393227 Some legacy specs may still refer to a ''@charset'' rule,
32403228 and explicitly talk about its presence in the stylesheet.
@@ -3447,18 +3435,23 @@ Changes from the 20 February 2014 Candidate Recommendation</h3>
34473435 * Fix several bugs in the tokenization and parsing algorithms.
34483436
34493437 * 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>> .
34503440
34513441 * Don't serialize the digit in an <<an+b>> when A is 1 or -1.
34523442
34533443 * Define all tokens to have a <a>representation</a> .
34543444
34553445 * Fixed minor bug in <a>check if two code points are a valid escape</a> --
34563446 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>> .
34573448
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)
34593450
34603451 * Trimmed whitespace from the beginning/ending of a declaration's value during parsing.
34613452
3453+ * Removed the Selectors-specific tokens, per WG resolution.
3454+
34623455 The following editorial changes were made:
34633456
34643457 * 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>
34713464
34723465 * Added the <<declaration-value>> and <<any-value>> productions.
34733466
3474- * Removed the Selectors-specific tokens, per WG resolution.
3475-
34763467 * Removed "code point" and "surrogate code point" in favor of the identical definitions in the Infra Standard.
34773468
34783469 * Clarified on every range that they are inclusive.
0 commit comments