Add support for value-colon (#1753)

master
Christopher Chedeau 2017-05-26 15:58:09 -07:00 committed by GitHub
parent 7ad38c525e
commit 044a58bb6f
4 changed files with 25 additions and 0 deletions

View File

@ -2632,6 +2632,12 @@ function genericPrintNoParens(path, options, print, args) {
if (i === 0 && n.groups[i].type === "value-operator") {
continue;
}
if (
(i + 1 < n.groups.length && n.groups[i + 1].type === "value-colon") ||
n.groups[i].type === "value-colon"
) {
continue;
}
if (i !== n.groups.length - 1) {
parts.push(line);
}
@ -2692,6 +2698,9 @@ function genericPrintNoParens(path, options, print, args) {
case "value-word": {
return n.value;
}
case "value-colon": {
return n.value;
}
case "value-comma": {
return concat([n.value, " "]);
}

View File

@ -0,0 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`colon.css 1`] = `
div {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
div {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
`;

View File

@ -0,0 +1,3 @@
div {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}

View File

@ -0,0 +1 @@
run_spec(__dirname, { parser: "postcss" });