From b52bbe1c8f0765304c16d394600d4a10ab6f689e Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Fri, 24 Jul 2020 11:38:54 +0200 Subject: [PATCH] [css-cascade][editorial] Clarify how @import behaves with invalid rules This change also modifies the mention of @charset as an example of an at-rule with restrictions on its relative ordering to replace it with @namespace, since @charset is no longer a valid rule. Closes #5313. --- css-cascade-3/Overview.bs | 8 ++++---- css-cascade-4/Overview.bs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/css-cascade-3/Overview.bs b/css-cascade-3/Overview.bs index 38ba8bfc3f7..c66a6ea1091 100644 --- a/css-cascade-3/Overview.bs +++ b/css-cascade-3/Overview.bs @@ -82,16 +82,16 @@ Importing Style Sheets: the ''@import'' rule then it doesn't apply to the imported stylesheet. * If a feature relies on the relative ordering of two or more constructs in a stylesheet - (such as the requirement that ''@charset'' must not have any other content preceding it), + (such as the requirement that ''@namespace'' rules must not have any other rules other than + ''@import'' preceding it), it only applies between constructs in the same stylesheet.

For example, declarations in style rules from imported stylesheets interact with the cascade as if they were written literally into the stylesheet at the point of the ''@import''. - Any ''@import'' rules must precede all other at-rules and style rules in a style sheet - (besides ''@charset'', which must be the first thing in the style sheet if it exists), - or else the ''@import'' rule is invalid. + Any ''@import'' rules must precede all other valid at-rules and style rules in a style sheet + (with ''@charset'' counting as an invalid rule), or else the ''@import'' rule is invalid. The syntax of ''@import'' is:

@import [ <> | <> ] <>? ;
diff --git a/css-cascade-4/Overview.bs b/css-cascade-4/Overview.bs index b70dd7a29ca..4054fdde809 100644 --- a/css-cascade-4/Overview.bs +++ b/css-cascade-4/Overview.bs @@ -80,7 +80,8 @@ Importing Style Sheets: the ''@import'' rule then it doesn't apply to the imported stylesheet. * If a feature relies on the relative ordering of two or more constructs in a stylesheet - (such as the requirement that ''@charset'' must not have any other content preceding it), + (such as the requirement that ''@namespace'' rules must not have any other rules other than + ''@import'' preceding it), it only applies between constructs in the same stylesheet.

@@ -89,9 +90,8 @@ Importing Style Sheets: the ''@import'' rule Similarly, style rules in a stylesheet imported into a scoped stylesheet are scoped in the same way. - Any ''@import'' rules must precede all other at-rules and style rules in a style sheet - (besides ''@charset'', which must be the first thing in the style sheet if it exists), - or else the ''@import'' rule is invalid. + Any ''@import'' rules must precede all other valid at-rules and style rules in a style sheet + (with ''@charset'' counting as an invalid rule), or else the ''@import'' rule is invalid. The syntax of ''@import'' is: