Native CSS Modules #570
ennioVisco
started this conversation in
General
Replies: 1 comment 1 reply
-
IMO, this is too implicit. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What problem does this feature solve?
CSS Modules are the framework-agnostic build-stage way to write scoped styles.
However, they are currently a bit cumbersome to use in vue, compared to other styling techniques.
Proposal: when in SFC there is a
<style module>
block (and perhaps no other<style>
tag), automatically interpret all CSS classes as module classes.What does the proposed API look like?
Currently, it works like this:
Ideally, we should have:
Where essentially the compiler automatically wraps the
className
s in$style['className']
.Beta Was this translation helpful? Give feedback.
All reactions