Skip to content

Commit 4c9c0b6

Browse files
committed
[css-nesting-1][editorial] Add a note recommending against mixing properties and nested rules willy-nilly. #8349.
1 parent 64d3416 commit 4c9c0b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

css-nesting-1/Overview.bs

+9
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,15 @@ Mixing Nesting Rules and Declarations {#mixing}
873873
before "Order Of Appearance" comes into consideration.
874874
</div>
875875

876+
Note: While one <em>can</em> freely intermix declarations and nested rules,
877+
it's harder to read and somewhat confusing to do so,
878+
since all the properties <em>act as if</em> they came before all the rules.
879+
For readability's sake,
880+
it's recommended that authors put all their properties first in a style rule,
881+
before any nested rules.
882+
(This also happens to act slightly better in older user agents,
883+
due to specifics of how parsing and error-recovery work.)
884+
876885

877886
<!--
878887
████

0 commit comments

Comments
 (0)