Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Commit

Permalink
4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Jul 14, 2015
1 parent 951597d commit 6ccf4a9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 4.1.0 - 2015-07-14

- Added: plugin now returns itself in order to expose a `setVariables` function
that allow you to programmatically change the variables.
([#35](https://github.com/postcss/postcss-custom-properties/pull/35))

# 4.0.0 - 2015-06-17

- Changed: messages and exceptions are now sent using postcss message API.
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ div {
}
```

Note that plugin returns itself in order to expose a `setVariables` function
that allow you to programmatically change the variables.

```js
var variables = {
"--a": "b",
}
var plugin = customProperties()
plugin.setVariables(variables)
var result = postcss()
.use(plugin)
.process(input)
```

This might help for dynamic live/hot reloading.

Checkout [tests](test) for more.

### Options
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-custom-properties",
"version": "4.0.0",
"version": "4.1.0",
"description": "PostCSS plugin to polyfill W3C CSS Custom Properties for cascading variables",
"keywords": [
"css",
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ test(
}
)

test("allows users to programatically change the variables", function(t) {
test("allows users to programmatically change the variables", function(t) {
var variables = {
"--test-one": "js-one",
"--test-two": "js-two",
Expand Down

0 comments on commit 6ccf4a9

Please sign in to comment.