Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

Conversation

@LucasPerso
Copy link
Contributor

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 !

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 !
@alepee
Copy link
Member

alepee commented Mar 3, 2017

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.

@johangirod
Copy link
Contributor

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 vitamin-css-modules plugin. But until then, we should merge this PR.

@christophehurpeau
Copy link
Contributor

christophehurpeau commented Mar 3, 2017

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...

@LucasPerso
Copy link
Contributor Author

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.

@johangirod
Copy link
Contributor

johangirod commented Mar 3, 2017

The best might be to ask them directly though an issue. But they explicitely stating that :

You can export values with css modules similar to using variables in less or sass.

I found the PR where they explain the rational behind it:
css-modules/css-modules-loader-core#28

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants