node-cssjanus
node-cssjanus copied to clipboard
Inconsistent flipping behavior breaks custom CSS properties
When the word "right" or "left" is used as part of the name of a custom CSS property, the name is flipped by CSSJanus when the property is assigned, but not when the property is used, those breaking it's functionality.
Example input:
body.theme-dark {
--right-rail-bg: blue;
}
.right-rail {
background: var(--right-rail-bg);
}
CSSJanus output:
body.theme-dark {
--left-rail-bg: blue;
}
.right-rail {
background: var(--right-rail-bg); /* invalid */
}
It is probably better to not change custom property names at all, but it should at least be consistent.