File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed
plugins/postcss-custom-properties Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change
1
+ # 4.1.0 - 2015-07-14
2
+
3
+ - Added: plugin now returns itself in order to expose a ` setVariables ` function
4
+ that allow you to programmatically change the variables.
5
+ ([ #35 ] ( https://github.com/postcss/postcss-custom-properties/pull/35 ) )
6
+
1
7
# 4.0.0 - 2015-06-17
2
8
3
9
- Changed: messages and exceptions are now sent using postcss message API.
Original file line number Diff line number Diff line change 59
59
}
60
60
```
61
61
62
+ Note that plugin returns itself in order to expose a ` setVariables ` function
63
+ that allow you to programmatically change the variables.
64
+
65
+ ``` js
66
+ var variables = {
67
+ " --a" : " b" ,
68
+ }
69
+ var plugin = customProperties ()
70
+ plugin .setVariables (variables)
71
+ var result = postcss ()
72
+ .use (plugin)
73
+ .process (input)
74
+ ```
75
+
76
+ This might help for dynamic live/hot reloading.
77
+
62
78
Checkout [ tests] ( test ) for more.
63
79
64
80
### Options
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " postcss-custom-properties" ,
3
- "version" : " 4.0 .0" ,
3
+ "version" : " 4.1 .0" ,
4
4
"description" : " PostCSS plugin to polyfill W3C CSS Custom Properties for cascading variables" ,
5
5
"keywords" : [
6
6
" css" ,
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ test(
110
110
}
111
111
)
112
112
113
- test ( "allows users to programatically change the variables" , function ( t ) {
113
+ test ( "allows users to programmatically change the variables" , function ( t ) {
114
114
var variables = {
115
115
"--test-one" : "js-one" ,
116
116
"--test-two" : "js-two" ,
You can’t perform that action at this time.
0 commit comments