Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-custom-selectors

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-custom-selectors - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0

5

CHANGELOG.md

@@ -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 @@

6

dist/index.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc