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
Copy file name to clipboardExpand all lines: packages/vue-component/README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,26 @@ As an alternative to scoped styles, you can use CSS modules to scope your CSS to
96
96
</script>
97
97
```
98
98
99
+
By default, your styles will be assigned to the `$style` computed property. You can customize this by setting the module attribute. This also allows you to create multiple "modules" in one component file:
100
+
101
+
```html
102
+
<stylemodule="foo">
103
+
.color {
104
+
color: orange;
105
+
}
106
+
</style>
107
+
<stylemodule="bar">
108
+
.color {
109
+
color: purple;
110
+
}
111
+
</style>
112
+
113
+
<template>
114
+
<div:class="foo.color">Foo Text</div>
115
+
<div:class="bar.color">Bar Text</div>
116
+
</template>
117
+
```
118
+
99
119
Note: composing from other files is not supported by the built-in CSS modules processor. See the community packages.
0 commit comments