postcss-custom-selectors
Advanced tools
Comparing version
@@ -0,1 +1,6 @@ | ||
# 3.0.0 - 2015-08-25 | ||
- Removed: compatibility with postcss v4.x | ||
- Added: compatibility with postcss v5.x | ||
# 2.3.0 - 2015-07-14 | ||
@@ -2,0 +7,0 @@ |
@@ -45,3 +45,3 @@ "use strict"; | ||
// first, read custom selectors | ||
css.eachAtRule(function (rule) { | ||
css.walkAtRules(function (rule) { | ||
if (rule.name !== "custom-selector") { | ||
@@ -66,3 +66,3 @@ return; | ||
// Convert those selectors to :matches() | ||
css.eachRule(function (rule) { | ||
css.walkRules(function (rule) { | ||
if (rule.selector.indexOf(":--") > -1) { | ||
@@ -85,3 +85,3 @@ rule.selector = rule.selector.replace(CUSTOM_SELECTOR_RE, function (extensionName, matches, selector) { | ||
toRemove.forEach(function (rule) { | ||
rule.removeSelf(); | ||
rule.remove(); | ||
}); | ||
@@ -88,0 +88,0 @@ }; |
{ | ||
"name": "postcss-custom-selectors", | ||
"version": "2.3.0", | ||
"version": "3.0.0", | ||
"description": "PostCSS plugin to transform W3C CSS Extensions(Custom Selectors) to more compatible CSS", | ||
@@ -21,17 +21,11 @@ "keywords": [ | ||
}, | ||
"homepage": "https://github.com/postcss/postcss-custom-selectors", | ||
"bugs": { | ||
"url": "https://github.com/postcss/postcss-custom-selectors/issues" | ||
}, | ||
"main": "dist/index.js", | ||
"files": [ | ||
"CHANGELOG.md", | ||
"LICENSE", | ||
"dist", | ||
"README-zh.md" | ||
], | ||
"main": "dist/index.js", | ||
"dependencies": { | ||
"balanced-match": "^0.2.0", | ||
"postcss": "^4.1.7", | ||
"postcss-selector-matches": "^1.2.1" | ||
"postcss": "^5.0.0", | ||
"postcss-selector-matches": "^2.0.0" | ||
}, | ||
@@ -42,3 +36,3 @@ "devDependencies": { | ||
"babel-tape-runner": "^1.1.0", | ||
"eslint": "^0.23.0", | ||
"eslint": "^1.0.0", | ||
"tape": "^4.0.0" | ||
@@ -45,0 +39,0 @@ }, |
@@ -40,3 +40,3 @@ # PostCSS Custom Selectors | ||
Or just: | ||
Or just: | ||
@@ -49,3 +49,3 @@ ```js | ||
input.css: | ||
input: | ||
@@ -102,2 +102,24 @@ ```css | ||
You can even make some smart use like this: | ||
```css | ||
@custom-selector :--button button, .button; | ||
@custom-selector :--enter :hover, :focus; | ||
:--button:--enter { | ||
} | ||
``` | ||
output | ||
```css | ||
button:hover, | ||
.button:hover, | ||
button:focus, | ||
.button:focus { | ||
} | ||
``` | ||
## Options | ||
@@ -104,0 +126,0 @@ |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17871
0.86%309
7.67%0
-100%2
100%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated