Skip to content

Commit abe7bf9

Browse files
committed
actually got the expectations in line with the plugins
1 parent 7e80709 commit abe7bf9

File tree

3 files changed

+35
-34
lines changed

3 files changed

+35
-34
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
:exports {
2-
--small: --x__breakpoints__small;
3-
--medium: --x__breakpoints__medium;
4-
--large: --x__breakpoints__large;
2+
--small: "(max-width: 30em)";
3+
--medium: "(max-width: 60em)";
4+
--large: "(max-width: 90em)";
55
}
66

7-
@custom-media --x__breakpoints__small (max-width: 30em);
8-
@custom-media --x__breakpoints__medium (max-width: 60em);
9-
@custom-media --x__breakpoints__large (max-width: 90em);
7+
@custom-media --small (max-width: 30em);
8+
@custom-media --medium (max-width: 60em);
9+
@custom-media --large (max-width: 90em);

test/cssi/media-queries/expected.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
@custom-media --x__source__small (max-width: 30em);
2-
@custom-media --x__source__medium (max-width: 60em);
3-
@custom-media --x__source__large (max-width: 90em);
1+
@custom-media --small (max-width: 30em);
2+
@custom-media --medium (max-width: 60em);
3+
@custom-media --large (max-width: 90em);
44

5-
._media-queries_source__red {
5+
.exported-red {
66
color: red;
77
}
88

9-
@media (max-width: 30em) {
10-
._media-queries_source__red {
9+
@media (--small) {
10+
.exported-red {
1111
color: maroon;
1212
}
1313
}
1414

15-
@media (max-width: 60em) {
16-
._media-queries_source__red {
15+
@media (--medium) {
16+
.exported-red {
1717
color: darkmagenta;
1818
}
1919
}
2020

21-
@media (max-width: 90em) {
22-
._media-queries_source__red {
21+
@media (--large) {
22+
.exported-red {
2323
color: fuchsia;
2424
}
2525
}

test/cssi/media-queries/source.css

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
1-
:imports("./breakpoints.css") {
2-
--i__breakpoints__small: --small;
3-
--i__breakpoints__medium: --medium;
4-
--i__breakpoints__large: --large;
1+
:import("./breakpoints.css") {
2+
i__breakpoints__small: --small;
3+
i__breakpoints__medium: --medium;
4+
i__breakpoints__large: --large;
55
}
66

7-
:exports {
8-
--small: --x__source__small;
9-
--medium: --x__source__medium;
10-
--large: --x__source__large;
7+
:export {
8+
--small: i__breakpoints__small;
9+
--medium: i__breakpoints__medium;
10+
--large: i__breakpoints__large;
11+
red: exported-red;
1112
}
1213

13-
@custom-media --x__source__small --i__breakpoints__small;
14-
@custom-media --x__source__medium --i__breakpoints__medium;
15-
@custom-media --x__source__large --i__breakpoints__large;
14+
@custom-media --small i__breakpoints__small;
15+
@custom-media --medium i__breakpoints__medium;
16+
@custom-media --large i__breakpoints__large;
1617

17-
.red {
18+
.exported-red {
1819
color: red;
1920
}
2021

21-
@media (--x__source__small) {
22-
.red {
22+
@media (--small) {
23+
.exported-red {
2324
color: maroon;
2425
}
2526
}
2627

27-
@media (--x__source__medium) {
28-
.red {
28+
@media (--medium) {
29+
.exported-red {
2930
color: darkmagenta;
3031
}
3132
}
3233

33-
@media (--x__source__large) {
34-
.red {
34+
@media (--large) {
35+
.exported-red {
3536
color: fuchsia;
3637
}
3738
}

0 commit comments

Comments
 (0)