postcss-calc
Advanced tools
Comparing version 5.2.1 to 5.3.0
@@ -0,1 +1,6 @@ | ||
# 5.3.0 - 2016-07-11 | ||
- Added: support for selector transformation via `selectors` option. | ||
([#29](https://github.com/postcss/postcss-calc/pull/29) - @uniquegestaltung) | ||
# 5.2.1 - 2016-04-10 | ||
@@ -2,0 +7,0 @@ |
@@ -19,2 +19,3 @@ /** | ||
var mediaQueries = options.mediaQueries | ||
var selectors = options.selectors | ||
@@ -57,4 +58,7 @@ return function(style, result) { | ||
} | ||
else if (selectors && rule.type === "rule") { | ||
return transformValue(rule, "selector") | ||
} | ||
}) | ||
} | ||
}) |
{ | ||
"name": "postcss-calc", | ||
"version": "5.2.1", | ||
"version": "5.3.0", | ||
"description": "PostCSS plugin to reduce calc()", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -137,2 +137,21 @@ # postcss-calc [![Build Status](https://travis-ci.org/postcss/postcss-calc.png)](https://travis-ci.org/postcss/postcss-calc) | ||
#### `selectors` (default: `false`) | ||
Allows calc() usage as part of selectors. | ||
```js | ||
var out = postcss() | ||
.use(calc({selectors: true})) | ||
.process(css) | ||
.css | ||
``` | ||
Example: | ||
```css | ||
div[data-size="calc(3*3)"] { | ||
width: 100px; | ||
} | ||
``` | ||
--- | ||
@@ -139,0 +158,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8771
53
172