postcss-autoreset
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -6,11 +6,13 @@ 'use strict'; | ||
}); | ||
var matchers = { | ||
bem: function bem(_ref) { | ||
var selector = _ref.selector; | ||
var matchers = { | ||
bem: function bem(rule) { | ||
return !rule.selector.match(/--/); | ||
return !selector.match(/(--|:)/); | ||
}, | ||
suit: function suit(rule) { | ||
var selector = rule.selector; | ||
return !(selector.match(/--/) || selector.match(/\.is\-/i)); | ||
suit: function suit(_ref2) { | ||
var selector = _ref2.selector; | ||
return !(selector.match(/(--|:)/) || selector.match(/\.is\-/i)); | ||
} | ||
@@ -17,0 +19,0 @@ }; |
{ | ||
"name": "postcss-autoreset", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "PostCSS plugin for partial styles reset", | ||
@@ -42,3 +42,4 @@ "main": "dist/index.js", | ||
"tap-difflet": "^0.3.0", | ||
"tap-spec": "^4.1.0" | ||
"tap-spec": "^4.1.0", | ||
"tape": "^4.4.0" | ||
}, | ||
@@ -45,0 +46,0 @@ "dependencies": { |
@@ -29,2 +29,6 @@ # PostCSS Auto Reset | ||
.block:hover { | ||
background-color: red; | ||
} | ||
.block__element { | ||
@@ -46,2 +50,6 @@ margin: 1em; | ||
.block:hover { /* ignored, we don`t need to reset pseudoclasses */ | ||
background-color: red; | ||
} | ||
.block__element { /* reseted */ | ||
@@ -85,4 +93,4 @@ all: initial; | ||
Possible values: | ||
- 'bem' - reset all BEM blocks and element, ignore modifiers. (naming: `.block__element-modifier`); | ||
- 'suit' - reset all SUIT CSS components and parts, ignore modifiers and states. | ||
- 'bem' - reset all BEM blocks and element, ignore modifiers and pseudoclasses. (naming: `.block__element-modifier`); | ||
- 'suit' - reset all SUIT CSS components and parts, ignore modifiers, states and pseudoclasses. | ||
@@ -89,0 +97,0 @@ You can define custom rules filter to fit your styles naming. |
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
8639
8
104
111
8