diff --git a/css-cascade-6/Overview.bs b/css-cascade-6/Overview.bs index c36e10fee97..f15a982da91 100644 --- a/css-cascade-6/Overview.bs +++ b/css-cascade-6/Overview.bs @@ -92,19 +92,23 @@ Importing Style Sheets: the ''@import'' rule
 		@import [ <> | <> ]
-		        [ layer | layer(<>) ]?
-		        <> ;
+		        [[ layer | layer(<>) ]
+		         || [ scope( [ (<>) ]? [ to (<>) ]? ) | <> ]
+		         || <>]?
+		        <>?;
 
-		<import-conditions> = [ supports( [ <> | <> ] ) ]?
-		                     <>?
+ <supports-import-condition> = [ supports( [ <> | <> ] ) ] + <media-import-condition> = <> where: * the <> or <> gives the URL of the style sheet to be imported. - * the optional ''layer'' keyword or ''layer()'' function - assigns the contents of the style sheet + and optionally: + + * the ''layer'' keyword or ''layer()'' function, + which assigns the contents of the style sheet into its own anonymous [=cascade layer=] or into the named [=cascade layer=]. @@ -113,9 +117,24 @@ Importing Style Sheets: the ''@import'' rule but is subject to any [=import conditions=] (just as if declared by an ''@layer'' rule wrapped in the appropriate [=conditional group rules=]). + * the ''scope()'' function, + which [=scopes=] the [=style rules=] within the stylesheet, + using the [=scoping roots=] and [=scoping limits=] + as described by [[#scope-limits]]. + + Note: While the [=style rules=] within the imported stylesheet + become [=scoped=], + they do not become [=nested style rule|nested=]. + In particular, + top-level selectors are not re-interpreted as [=relative selectors=], + and the ''&'' pseudo-class maintains its non-nested behavior. + + * the [=import conditions=], + <> and <>, + which state the conditions under which the ''@import'' rule applies. - * the optional <> - states the [=import conditions=] under which it applies. + Issue(10972): Accept <> at any point + after the URL/string.
The following conditional @import rule @@ -137,6 +156,15 @@ Importing Style Sheets: the ''@import'' rule
+
+ The following imports a stylesheet, and scopes the style rules + to elements matching .card. + +
+		@import url("card.css") scope(.card);
+		
+
+ If a <> is provided, it must be interpreted as a <> with the same value. @@ -963,6 +991,11 @@ Changes since the 21 March 2023 Working Draft Significant changes since the 21 March 2023 Working Draft include: + * Added the @import scope() syntax, + and the ability to specificy ''layer()'', ''scope()'', and ''supports()'' + in any order. + (Issue 7348) + * Allowed [=declarations=] directly within ''@scope''. (Issue 10389)