File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
extend/unify-root-pseudoelement Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ : root .foo-1 , : root .bar-1 .baz-1 { test : 1 ; }
2
+
3
+ .foo-2 : root .bar-2 , .baz-2 .foo-2 : root .bang-2 { test : 2 ; }
4
+
5
+ html : root .bar-3 { test : 3 ; }
6
+
7
+ .foo-4 : root > .bar-4 .x-4 , .baz-4 .foo-4 : root > .bar-4 .bang-4 .y-4 { test : 4 ; }
Original file line number Diff line number Diff line change
1
+ // We assume that by default classes don't apply to the :root unless marked explicitly.
2
+ :root .foo-1 { test : 1 ; }
3
+ .bar-1 .baz-1 { @extend .foo-1 ; }
4
+
5
+ // We know the two classes must be the same :root element so we can combine them.
6
+ .foo-2 :root .bar-2 { test : 2 ; }
7
+ .baz-2 :root .bang-2 { @extend .bar-2 ; }
8
+
9
+ // This extend should not apply because the :root elements are different.
10
+ html :root .bar-3 { test : 3 ; }
11
+ xml:root .bang-3 { @extend .bar-3}
12
+
13
+ // We assume that direct descendant of the :root is not the same element as a descendant.
14
+ .foo-4 :root > .bar-4 .x-4 { test: 4 ; }
15
+ .baz-4 :root .bang-4 .y-4 {@extend .x-4}
Original file line number Diff line number Diff line change
1
+ ---
2
+ :output_style : :compact
Original file line number Diff line number Diff line change
1
+ ---
2
+ :start_version : ' 3.5'
You can’t perform that action at this time.
0 commit comments