fix(css): don't eat selector namespace (#3956)
parent
1ca4e2b90a
commit
ec4f4eb6d3
|
@ -309,7 +309,12 @@ function genericPrint(path, options, print) {
|
||||||
return adjustStrings(node.value, options);
|
return adjustStrings(node.value, options);
|
||||||
}
|
}
|
||||||
case "selector-tag": {
|
case "selector-tag": {
|
||||||
return adjustNumbers(node.value);
|
return concat([
|
||||||
|
node.namespace
|
||||||
|
? concat([node.namespace === true ? "" : node.namespace.trim(), "|"])
|
||||||
|
: "",
|
||||||
|
adjustNumbers(node.value)
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
case "selector-id": {
|
case "selector-id": {
|
||||||
return concat(["#", node.value]);
|
return concat(["#", node.value]);
|
||||||
|
@ -358,7 +363,12 @@ function genericPrint(path, options, print) {
|
||||||
return concat([leading, value]);
|
return concat([leading, value]);
|
||||||
}
|
}
|
||||||
case "selector-universal": {
|
case "selector-universal": {
|
||||||
return node.value;
|
return concat([
|
||||||
|
node.namespace
|
||||||
|
? concat([node.namespace === true ? "" : node.namespace.trim(), "|"])
|
||||||
|
: "",
|
||||||
|
adjustNumbers(node.value)
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
case "selector-selector": {
|
case "selector-selector": {
|
||||||
return group(indent(concat(path.map(print, "nodes"))));
|
return group(indent(concat(path.map(print, "nodes"))));
|
||||||
|
|
|
@ -295,6 +295,23 @@ exports[`selectors.css 1`] = `
|
||||||
>>> .child-one {}
|
>>> .child-one {}
|
||||||
>>> .child-two {}
|
>>> .child-two {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This matches all XHTML <a> elements, as XHTML is the default unprefixed namespace */
|
||||||
|
a {}
|
||||||
|
|
||||||
|
/* This matches all SVG <a> elements */
|
||||||
|
svg|a {}
|
||||||
|
|
||||||
|
/* This matches both XHTML and SVG <a> elements */
|
||||||
|
*|a {}
|
||||||
|
|
||||||
|
|B {}
|
||||||
|
|
||||||
|
ns|* {}
|
||||||
|
|
||||||
|
*|* {}
|
||||||
|
|
||||||
|
|* {}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
.a,
|
.a,
|
||||||
.b,
|
.b,
|
||||||
|
@ -660,4 +677,28 @@ exports[`selectors.css 1`] = `
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This matches all XHTML <a> elements, as XHTML is the default unprefixed namespace */
|
||||||
|
a {
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This matches all SVG <a> elements */
|
||||||
|
svg|a {
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This matches both XHTML and SVG <a> elements */
|
||||||
|
*|a {
|
||||||
|
}
|
||||||
|
|
||||||
|
|B {
|
||||||
|
}
|
||||||
|
|
||||||
|
ns|* {
|
||||||
|
}
|
||||||
|
|
||||||
|
*|* {
|
||||||
|
}
|
||||||
|
|
||||||
|
|* {
|
||||||
|
}
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -292,3 +292,20 @@
|
||||||
>>> .child-one {}
|
>>> .child-one {}
|
||||||
>>> .child-two {}
|
>>> .child-two {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This matches all XHTML <a> elements, as XHTML is the default unprefixed namespace */
|
||||||
|
a {}
|
||||||
|
|
||||||
|
/* This matches all SVG <a> elements */
|
||||||
|
svg|a {}
|
||||||
|
|
||||||
|
/* This matches both XHTML and SVG <a> elements */
|
||||||
|
*|a {}
|
||||||
|
|
||||||
|
|B {}
|
||||||
|
|
||||||
|
ns|* {}
|
||||||
|
|
||||||
|
*|* {}
|
||||||
|
|
||||||
|
|* {}
|
||||||
|
|
Loading…
Reference in New Issue