Don't lowercase &class in SCSS/Less selectors (#2834)

Fixes #2830
This commit is contained in:
Simon Lydell authored and GitHub committed 2017-09-15 19:48:04 +02:00
1 parent 5bd8ca472b
commit 23041e2113
4 files changed
+30 -1

No files matched your search

+6 -1
View File
@@ -217,7 +217,12 @@ function genericPrint(path, options, print) {
return adjustStrings(n.value, options);
}
case "selector-tag": {
return maybeToLowerCase(n.value);
const parent = path.getParentNode();
const index = parent.nodes.indexOf(n);
const previous = index > 0 ? parent.nodes[index - 1] : null;
return previous && previous.type === "selector-nesting"
? n.value
: maybeToLowerCase(n.value);
}
case "selector-id": {
return concat(["#", n.value]);
@@ -50,6 +50,10 @@ a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
prop: val;
}
&Keep & NoKeep {
prop: val;
}
@KeepDetachedRuleset();
@KeepDetachedRuleset ( /* comment */ );
@@ -123,6 +127,10 @@ a[href="KeepAttrValue"]:hover::first-letter,
prop: val;
}
&Keep & nokeep {
prop: val;
}
@KeepDetachedRuleset();
@KeepDetachedRuleset();
@@ -208,6 +216,10 @@ a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
prop: val;
}
&Keep & NoKeep {
prop: val;
}
BACKGROUND: {
COLOR: RED;
}
@@ -284,6 +296,10 @@ a[href="KeepAttrValue"]:hover::first-letter,
prop: val;
}
&Keep & nokeep {
prop: val;
}
background: {
color: RED;
}
+4
View File
@@ -47,6 +47,10 @@ a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
prop: val;
}
&Keep & NoKeep {
prop: val;
}
@KeepDetachedRuleset();
@KeepDetachedRuleset ( /* comment */ );
+4
View File
@@ -50,6 +50,10 @@ a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
prop: val;
}
&Keep & NoKeep {
prop: val;
}
BACKGROUND: {
COLOR: RED;
}