-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: #130 variables in nested comma-separated selectors
- Loading branch information
Sergey Bondar
authored and
Sergey Bondar
committed
Jan 6, 2022
1 parent
f791dd2
commit f879f4f
Showing
4 changed files
with
153 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
:root { | ||
--some-width: 150px; | ||
} | ||
:root { | ||
--White1: #FFF; | ||
} | ||
|
||
.a, .b { | ||
width: var(--some-width); | ||
|
||
.simple { | ||
color: var(--White1); | ||
} | ||
} | ||
|
||
.a { | ||
width: var(--some-width); | ||
|
||
a, label, &:after { | ||
color: var(--White1); | ||
} | ||
} | ||
|
||
/* postcss-nested double parent selector case */ | ||
.a, .b { | ||
/* here variable */ | ||
width: var(--some-width); | ||
|
||
/* and here another */ | ||
a, label { | ||
background: var(--White1); | ||
|
||
ol, ul { | ||
width: var(--some-width); | ||
} | ||
} | ||
} |
87 changes: 87 additions & 0 deletions
87
test/fixtures/cascade-and-multiple-on-nested-rules.expected.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
.a { | ||
width: 150px; | ||
|
||
.simple { | ||
color: #FFF | ||
} | ||
} | ||
|
||
.b { | ||
width: 150px; | ||
|
||
.simple { | ||
color: #FFF | ||
} | ||
} | ||
|
||
.a { | ||
width: 150px; | ||
|
||
a { | ||
color: #FFF | ||
} | ||
|
||
label { | ||
color: #FFF | ||
} | ||
|
||
&:after { | ||
color: #FFF | ||
} | ||
} | ||
|
||
.a { | ||
width: 150px; | ||
|
||
a { | ||
background: #FFF; | ||
|
||
ol { | ||
width: 150px; | ||
} | ||
|
||
ul { | ||
width: 150px; | ||
} | ||
} | ||
|
||
label { | ||
background: #FFF; | ||
|
||
ol { | ||
width: 150px; | ||
} | ||
|
||
ul { | ||
width: 150px; | ||
} | ||
} | ||
} | ||
|
||
.b { | ||
width: 150px; | ||
|
||
a { | ||
background: #FFF; | ||
|
||
ol { | ||
width: 150px; | ||
} | ||
|
||
ul { | ||
width: 150px; | ||
} | ||
} | ||
|
||
label { | ||
background: #FFF; | ||
|
||
ol { | ||
width: 150px; | ||
} | ||
|
||
ul { | ||
width: 150px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters