postcss-autoreset
Advanced tools
Comparing version 1.1.5 to 1.2.0
@@ -8,2 +8,5 @@ # Change Log | ||
## [1.2.0] - 2016-09-29 | ||
- Improved accuracy of SUIT CSS regex (see https://github.com/maximkoretskiy/postcss-autoreset/pull/17 and https://github.com/maximkoretskiy/postcss-autoreset/issues/16). Thnx @giuseppeg and @simonsmith for suggestion and contribution. | ||
## [1.1.5] - 2016-01-21 | ||
@@ -10,0 +13,0 @@ - Fix plugin prepublish script again with babel-plugin-add-module-exports. Thnx @mikaa123 for patience %) |
@@ -6,2 +6,7 @@ 'use strict'; | ||
}); | ||
/** | ||
* Demo - https://regex101.com/r/AA4xaq/3 | ||
*/ | ||
var suitRegex = /^\.(?:[a-z0-9]*-)?[A-Z](?:[a-zA-Z0-9]+)(?:-[a-zA-Z0-9]+)?$/; | ||
var matchers = { | ||
@@ -16,3 +21,3 @@ bem: function bem(_ref) { | ||
return !(selector.match(/(--|:)/) || selector.match(/\.is\-/i)); | ||
return selector.charAt(0) === '.' && suitRegex.test(selector); | ||
} | ||
@@ -19,0 +24,0 @@ }; |
{ | ||
"name": "postcss-autoreset", | ||
"version": "1.1.5", | ||
"version": "1.2.0", | ||
"description": "PostCSS plugin for partial styles reset", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -23,2 +23,3 @@ # PostCSS Auto Reset | ||
The following CSS is written in [BEM](https://en.bem.info/) notation. | ||
@@ -45,4 +46,7 @@ ```css | ||
```css | ||
.block, .block__element { /* combined reset block */ | ||
all: initial; | ||
} | ||
.block { /* reseted */ | ||
all: initial; | ||
padding: 1em; | ||
@@ -56,3 +60,2 @@ } | ||
.block__element { /* reseted */ | ||
all: initial; | ||
margin: 1em; | ||
@@ -94,4 +97,4 @@ } | ||
Possible values: | ||
- '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. | ||
- 'bem' - reset all [BEM](https://en.bem.info/) blocks and element, ignore modifiers and pseudoclasses. (naming: `.block__element-modifier`); | ||
- 'suit' - reset all [SUIT CSS](https://suitcss.github.io/) components and parts, ignore modifiers, states and pseudoclasses. | ||
@@ -98,0 +101,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
11315
141
114