@@ -721,6 +721,11 @@ Nesting Other At-Rules {#conditionals}
721
721
and nested in a [=nested style rule=]
722
722
with the selector ''&'' ,
723
723
and placed before all other child rules.
724
+ This includes in the OM.
725
+ (That is,
726
+ the {{CSSContainerRule/childRules}} attribute
727
+ actually starts with this [=nested style rule=] ,
728
+ containing all the directly-nested properties.)
724
729
725
730
<div class=example>
726
731
@@ -755,10 +760,10 @@ Nesting Other At-Rules {#conditionals}
755
760
containing the 'grid-auto-flow' property.
756
761
</div>
757
762
758
- Issue: Need to modify the serialization rules,
759
- as in <a href="https://github.com/w3c/csswg-drafts/issues/7850#issuecomment-1288883780">this comment</a> ,
760
- to remove the wrapping rule
761
- when the first child rule is <code> & {...} </code> .
763
+ Note: This does mean that the serialization of such rules will differ
764
+ from how they were originally written ,
765
+ with <em> no </em> directly-nested properties in the serialization.
766
+
762
767
763
768
<h4 id=nesting-at-scope>
764
769
Nested ''@scope'' Rules</h4>
@@ -883,6 +888,13 @@ Mixing Nesting Rules and Declarations {#mixing}
883
888
due to specifics of how parsing and error-recovery work,
884
889
properties appearing after nested rules can get skipped.)
885
890
891
+ Note: Like with other types of rules,
892
+ the serialization of style rules in the presence of nesting
893
+ can vary from how they were originally written.
894
+ Notably, all directly-nested properties
895
+ will be serialized before any nested rules,
896
+ which is <em> another</em> reason to write properties before rules.
897
+
886
898
887
899
<!--
888
900
████
0 commit comments