Skip to content

Commit dbd3889

Browse files
author
Olivier Nicodemi
committed
Fix for 2991
1 parent 9373ea3 commit dbd3889

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

packages/less/src/less/visitors/to-css-visitor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class CSSVisitorUtils {
3939
? (rulesetNode.paths.length > 0) : false;
4040
}
4141

42-
resolveVisibility(node, originalRules) {
42+
resolveVisibility(node) {
4343
if (!node.blocksVisibility()) {
44-
if (this.isEmpty(node) && !this.containsSilentNonBlockedChild(originalRules)) {
44+
if (this.isEmpty(node)) {
4545
return ;
4646
}
4747

Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
.referenced {
2-
// line comment is enough to reproduce it
2+
// This file should not output anything if referenced.
33
@media (hover) {
4-
// sezam
4+
// This file should not output anything if referenced.
55
}
6-
// repeat to prove point
6+
// This file should not output anything if referenced.
77
@media (hover) {
8-
// sezam
8+
// This file should not output anything if referenced.
99
}
10-
// but block comment is not, huh
10+
// This file should not output anything if referenced.
1111
@media (hover) {
12-
/* salabim */
12+
/* This file should not output anything if referenced. */
1313
}
14-
// following block does not output, needs line comment
14+
// This file should not output anything if referenced.
1515
@media (hover) {
1616
color: #000000;
1717
}
1818
}
19-
// needs to be nested to fail
19+
// This file should not output anything if referenced.
2020
@media (hover) {
21-
// sezam
21+
// This file should not output anything if referenced.
22+
}
23+
@media (hover) {
24+
/* This file should not output anything if referenced. */
2225
}

0 commit comments

Comments
 (0)