-
Notifications
You must be signed in to change notification settings - Fork 30
Description
rtl-css-js
version: 1.14.1node
version: 14npm
(oryarn
) version: 1.22.x
Relevant code or config
convertProperty('boxShadow', 'var(--shadow16)');
What you did:
Fluent UI's css-in-js engine uses rtl-css-js for its rtl property and value computations. I noticed that css variable names that included numbers were matched by the textShadow
property value converter and transformed the name of the css variable
What happened:
var(--shadow16)
became var(--shadow-16)
which broke all rtl box shadows using Fluent UI.
Reproduction repository:
https://github.com/ling1726/box-shadow-rtl-css-js-repro
Problem description:
See above in What you did
Suggested solution:
This library could consider ignoring rtl doppelganger computations for any value that includes css variables. This is already the case for undefined and boolean values.
I'm also open to push back, if this check should be done by consumers.