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
[PostCSS Environment Variables] runs in all Node environments, with special instructions for:
@@ -67,19 +66,17 @@ postcss([
67
66
68
67
### importFrom
69
68
70
-
The `importFrom` option specifies sources where Environment Variables can be
71
-
imported from, which might be JS and JSON files, functions, and directly passed
72
-
objects.
69
+
The `importFrom` option specifies sources where Environment Variables can be imported from, which might be JS and JSON files, functions, and directly passed objects.
73
70
74
71
```js
75
-
postcssCustomProperties({
72
+
postcssEnvFunction({
76
73
importFrom:'path/to/file.js'/* module.exports = {
77
74
environmentVariables: {
78
75
'--branding-padding': '20px',
79
76
'--branding-small': '600px'
80
77
}
81
78
} */
82
-
});
79
+
})
83
80
```
84
81
85
82
```pcss
@@ -98,30 +95,47 @@ postcssCustomProperties({
98
95
}
99
96
```
100
97
101
-
Multiple sources can be passed into this option, and they will be parsed in the
102
-
order they are received. JavaScript files, JSON files, functions, and objects
103
-
will need to namespace Custom Properties using the `environmentVariables` or
104
-
`variables-variables` key.
98
+
Multiple sources can be passed into this option, and they will be parsed in the order they are received. JavaScript files, JSON files, functions, and objects will need to namespace Custom Properties using the `environmentVariables` or `variables-variables` key.
See example imports written in [JS](test/import-variables.js) and
124
-
[JSON](test/import-variables.json). Currently only valid [custom property names] (beginning with `--`) are accepted. Not all valid [declaration value names] are accepted.
136
+
See example imports written in [JS](test/import-variables.js) and [JSON](test/import-variables.json).
137
+
Currently only valid [custom property names] (beginning with `--`) are accepted.
138
+
Not all valid [declaration value names] are accepted.
0 commit comments