fix: add postcss plugin to handle values in css modules#261
fix: add postcss plugin to handle values in css modules#261LucasPerso wants to merge 1 commit intomasterfrom
Conversation
CSS modules provides values in css to pass arbitrary values in your css. It works with the help of a postcss plugin. It was missing in vitamin. This commit fixes it !
|
I'm not very comfortable with this. It is not part of any official specification, and can be achieved with CSS4 we already support thanks to CSSNext. |
|
I agree with you @alepee, I'm more comfortable using css custom properties. However, it seems that css values are part of css-modules specification. If we say we support css-modules, we should support all of the specs. In the future, we might add this as an option of the |
|
I think css values are part of css-modules specification is just an example of how to use values (using postcss-values) with css-modules, not the css-modules specitification... |
|
It is unclear to me if it is part or not of the specification. I find it odd that they show an example of how to use values if it is not part of the spec. |
|
The best might be to ask them directly though an issue. But they explicitely stating that :
I found the PR where they explain the rational behind it: It seems that it's part of css-modules, even if it's not the most known (although the possibility to define variable that can be imported both in JS and CSS is a great thing, particularly in this approach, which prevents you from too much coupling with css-modules) |
CSS modules provides values in css to pass arbitrary values in your css. It works with the help of a
postcss plugin. It was missing in vitamin. This commit fixes it !