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: README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,33 @@ transform(`
71
71
}
72
72
```
73
73
74
+
### CSS Modules :export block
75
+
76
+
Parsing the [CSS Modules (ICSS) :export](https://github.com/css-modules/icss#export) is supported. The `:export` is often used to share variables from CSS or from a preprocessor like Sass/Less/Stylus to Javascript:
77
+
78
+
```js
79
+
transform(`
80
+
.foo {
81
+
color: #f00;
82
+
}
83
+
84
+
:export {
85
+
myProp: #fff;
86
+
}
87
+
`);
88
+
```
89
+
90
+
↓ ↓ ↓ ↓ ↓ ↓
91
+
92
+
```js
93
+
{
94
+
foo: {
95
+
color:"#f00";
96
+
},
97
+
myProp:"#fff";
98
+
}
99
+
```
100
+
74
101
### CSS Media Queries (experimental)
75
102
76
103
_The API and parsed syntax for CSS Media Queries might change in the future_
0 commit comments