parent
16db5971f0
commit
43521565e7
|
@ -74,6 +74,10 @@ function massageAST(ast) {
|
||||||
newObj.value = newObj.value.replace(/ /g, "");
|
newObj.value = newObj.value.replace(/ /g, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ast.type === "value-word" && ast.isColor && ast.isHex) {
|
||||||
|
newObj.value = newObj.value.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
// (TypeScript) Ignore `static` in `constructor(static p) {}`
|
// (TypeScript) Ignore `static` in `constructor(static p) {}`
|
||||||
// and `export` in `constructor(export p) {}`
|
// and `export` in `constructor(export p) {}`
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -317,6 +317,9 @@ function genericPrint(path, options, print) {
|
||||||
return n.value;
|
return n.value;
|
||||||
}
|
}
|
||||||
case "value-word": {
|
case "value-word": {
|
||||||
|
if (n.isColor && n.isHex) {
|
||||||
|
return n.value.toLowerCase();
|
||||||
|
}
|
||||||
return n.value;
|
return n.value;
|
||||||
}
|
}
|
||||||
case "value-colon": {
|
case "value-colon": {
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`hexcolor.css 1`] = `
|
||||||
|
.foo {
|
||||||
|
color: #AAA;
|
||||||
|
-o-color: #fabcd3;
|
||||||
|
-webkit-color: #873;
|
||||||
|
-moz-color: #6bcdef;
|
||||||
|
-ms-color: #AAbbCC;
|
||||||
|
}
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.foo {
|
||||||
|
color: #aaa;
|
||||||
|
-o-color: #fabcd3;
|
||||||
|
-webkit-color: #873;
|
||||||
|
-moz-color: #6bcdef;
|
||||||
|
-ms-color: #aabbcc;
|
||||||
|
}
|
||||||
|
|
||||||
|
`;
|
|
@ -0,0 +1,7 @@
|
||||||
|
.foo {
|
||||||
|
color: #AAA;
|
||||||
|
-o-color: #fabcd3;
|
||||||
|
-webkit-color: #873;
|
||||||
|
-moz-color: #6bcdef;
|
||||||
|
-ms-color: #AAbbCC;
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
run_spec(__dirname, { parser: "postcss" });
|
|
@ -4,7 +4,7 @@ exports[`color-hex-lowercase.css 1`] = `
|
||||||
.foo{color:#ABCDEF}
|
.foo{color:#ABCDEF}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
.foo {
|
.foo {
|
||||||
color: #ABCDEF;
|
color: #abcdef;
|
||||||
}
|
}
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Reference in New Issue