fix(css): comments in selectors (#3909)
This commit is contained in:
1 parent
6b5765da36
commit
9e6bd15ade
10 files changed
+249
-64
No files matched your search
@@ -65,9 +65,11 @@ function genericPrint(path, options, print) {
|
||||
// with a colon, so keep the original case then.
|
||||
const isDetachedRulesetDeclaration =
|
||||
node.selector &&
|
||||
typeof node.selector === "string" &&
|
||||
node.selector.startsWith("@") &&
|
||||
node.selector.endsWith(":");
|
||||
node.selector.type !== "selector-root-invalid" &&
|
||||
((typeof node.selector === "string" &&
|
||||
/^@.+:.*$/.test(node.selector)) ||
|
||||
(node.selector.value && /^@.+:.*$/.test(node.selector.value)));
|
||||
|
||||
return concat([
|
||||
path.call(print, "selector"),
|
||||
node.important ? " !important" : "",
|
||||
|
||||
Reference in new issue
Block a user