@@ -721,6 +721,11 @@ Nesting Other At-Rules {#conditionals}
721721 and nested in a [=nested style rule=]
722722 with the selector ''&'' ,
723723 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.)
724729
725730 <div class=example>
726731
@@ -755,10 +760,10 @@ Nesting Other At-Rules {#conditionals}
755760 containing the 'grid-auto-flow' property.
756761 </div>
757762
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+
762767
763768<h4 id=nesting-at-scope>
764769Nested ''@scope'' Rules</h4>
@@ -883,6 +888,13 @@ Mixing Nesting Rules and Declarations {#mixing}
883888 due to specifics of how parsing and error-recovery work,
884889 properties appearing after nested rules can get skipped.)
885890
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+
886898
887899<!--
888900 ████
0 commit comments