actually prettier

This commit is contained in:
Toshit Chawda 2024-07-14 16:22:34 -07:00
parent fb53b44869
commit 56767f5b31
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
41 changed files with 1914 additions and 1919 deletions

View file

@ -1,26 +1,26 @@
import { rewriteCss } from "./shared";
import { rewriteCss } from "./shared"
const cssProperties = [
"background",
"background-image",
"mask",
"mask-image",
"list-style",
"list-style-image",
"border-image",
"border-image-source",
"cursor",
];
"background",
"background-image",
"mask",
"mask-image",
"list-style",
"list-style-image",
"border-image",
"border-image-source",
"cursor",
]
// const jsProperties = ["background", "backgroundImage", "mask", "maskImage", "listStyle", "listStyleImage", "borderImage", "borderImageSource", "cursor"];
CSSStyleDeclaration.prototype.setProperty = new Proxy(
CSSStyleDeclaration.prototype.setProperty,
{
apply(target, thisArg, argArray) {
if (cssProperties.includes(argArray[0]))
argArray[1] = rewriteCss(argArray[1]);
CSSStyleDeclaration.prototype.setProperty,
{
apply(target, thisArg, argArray) {
if (cssProperties.includes(argArray[0]))
argArray[1] = rewriteCss(argArray[1])
return Reflect.apply(target, thisArg, argArray);
},
},
);
return Reflect.apply(target, thisArg, argArray)
},
}
)