Skip to content

Commit 9373ea3

Browse files
author
Olivier Nicodemi
committed
Tests for 2991
1 parent f613188 commit 9373ea3

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

packages/test-data/css/_main/css-3.css

-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ body > .shadow {
136136
symbols: ‣;
137137
suffix: " ";
138138
}
139-
@-ms-viewport {
140-
}
141139
@unknown foo 42 (bar) {
142140
x {
143141
y: z;

packages/test-data/less/_main/import-reference-issues.less

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// * #2716 - A file imported by reference and then normally - multiple imports should be independent
66
// * #1968 - When using an @import (reference), mixins that contain an & selector get added to the compiled output improperly
77
// * #2162 - Cannot put import by reference inside of a mixin (also doubles #1896)
8+
// * #2991 - Empty @media queries generated through line comments when compiling less file with (reference)
89

910
// #1878: extend inside referenced file should not extend outside selectors
1011
@import (reference) "import-reference-issues/global-scope-import.less";
@@ -48,3 +49,5 @@ show-all-content {
4849
call-mixin-with-import-by-reference-inside {
4950
.mixin-with-import-by-reference-inside();
5051
}
52+
53+
@import (reference) "import-reference-issues/comments-2991.less";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.referenced {
2+
// line comment is enough to reproduce it
3+
@media (hover) {
4+
// sezam
5+
}
6+
// repeat to prove point
7+
@media (hover) {
8+
// sezam
9+
}
10+
// but block comment is not, huh
11+
@media (hover) {
12+
/* salabim */
13+
}
14+
// following block does not output, needs line comment
15+
@media (hover) {
16+
color: #000000;
17+
}
18+
}
19+
// needs to be nested to fail
20+
@media (hover) {
21+
// sezam
22+
}

0 commit comments

Comments
 (0)