Skip to content

Commit 7805ec7

Browse files
MoOxromainmenke
authored andcommitted
4.1.0
1 parent 71d9d61 commit 7805ec7

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

plugins/postcss-custom-properties/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
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+
17
# 4.0.0 - 2015-06-17
28

39
- Changed: messages and exceptions are now sent using postcss message API.

plugins/postcss-custom-properties/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ div {
5959
}
6060
```
6161

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+
6278
Checkout [tests](test) for more.
6379

6480
### Options

plugins/postcss-custom-properties/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-custom-properties",
3-
"version": "4.0.0",
3+
"version": "4.1.0",
44
"description": "PostCSS plugin to polyfill W3C CSS Custom Properties for cascading variables",
55
"keywords": [
66
"css",

plugins/postcss-custom-properties/test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ test(
110110
}
111111
)
112112

113-
test("allows users to programatically change the variables", function(t) {
113+
test("allows users to programmatically change the variables", function(t) {
114114
var variables = {
115115
"--test-one": "js-one",
116116
"--test-two": "js-two",

0 commit comments

Comments
 (0)