You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that all current transpilation steps happen before any of the custom transforms, but the renaming of idents from CSS modules happening after custom transforms.
I don't know how viable it is, but the way I'd expect it to work:
Entry custom transforms.
Built-in transpilation, CSS Modules idents.
Exit custom transforms.
This way it would be possible to adjust things both before the built-in transpilation, and after CSS Modules.
Use cases:
Using a custom env() visitor to replace it with some value which is then statically transpiled. Example: doing something like color-mix(in srgb, env(--my-color), transparent). Right now this will not transpile the color-mix as it will be done before the custom transforms, even though we could expand the env() into a static color.
It seems that all current transpilation steps happen before any of the custom transforms, but the renaming of idents from CSS modules happening after custom transforms.
I don't know how viable it is, but the way I'd expect it to work:
This way it would be possible to adjust things both before the built-in transpilation, and after CSS Modules.
Use cases:
Using a custom
env()
visitor to replace it with some value which is then statically transpiled. Example: doing something likecolor-mix(in srgb, env(--my-color), transparent)
. Right now this will not transpile thecolor-mix
as it will be done before the custom transforms, even though we could expand theenv()
into a static color.Adjusting the ident names for CSS Modules. This could allow to work around things like More control over CSS modules dashed-idents naming #315.
If it is not possible to achieve with the custom setup, I wonder what could be the alternatives?
The text was updated successfully, but these errors were encountered: