postcss-custom-selectors
Advanced tools
Comparing version 2.3.0 to 3.0.0
@@ -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 @@ |
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
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
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
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
309
0
2
1
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbalanced-match@0.4.2(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-flag@1.0.0(transitive)
+ Addedjs-base64@2.6.4(transitive)
+ Addedpostcss@5.2.18(transitive)
+ Addedpostcss-selector-matches@2.0.5(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.03.2.3(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedes6-promise@2.3.0(transitive)
- Removedjs-base64@2.1.9(transitive)
- Removedpostcss@4.1.16(transitive)
- Removedpostcss-selector-matches@1.2.1(transitive)
- Removedsource-map@0.4.4(transitive)
Updatedpostcss@^5.0.0