Skip to content

Commit ac1db56

Browse files
committed
add tests for chain selector support
1 parent 84c6e9b commit ac1db56

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

test/fixtures/chained-selector.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
button {
2+
--width-small: 50px;
3+
}
4+
5+
button.custom {
6+
--width-small: 100px;
7+
--width-medium: 200px;
8+
--width-large: 300px;
9+
--font-size: 12px;
10+
}
11+
12+
button.rounded.small {
13+
width: var(--width-small);
14+
}
15+
16+
button.custom.large {
17+
width: var(--width-large);
18+
}
19+
20+
button.rounded.custom.medium {
21+
width: var(--width-medium);
22+
}
23+
24+
button#id.rounded.custom.medium {
25+
width: var(--width-medium);
26+
}
27+
28+
button.small.pill.custom {
29+
width: var(--width-small);
30+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
button.rounded.small {
2+
width: 50px;
3+
}
4+
5+
button.custom.large {
6+
width: 300px;
7+
}
8+
9+
button.rounded.custom.medium {
10+
width: 200px;
11+
}
12+
13+
button#id.rounded.custom.medium {
14+
width: 200px;
15+
}
16+
17+
button.small.pill.custom {
18+
width: 100px;
19+
}

test/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ describe('postcss-css-variables', function() {
129129

130130
test('should work with `!important` variable declarations', 'important-variable-declaration');
131131

132+
test('should work with chained selectors', 'chained-selector');
132133

133134

134135
describe('with at-rules', function() {

0 commit comments

Comments
 (0)