postcss-nesting
Advanced tools
Comparing version 4.0.0 to 4.0.1
# Changes to PostCSS Nesting | ||
### 4.0.1 (May 22, 2017) | ||
- Improve selector validity testing | ||
### 4.0.0 (May 20, 2017) | ||
@@ -4,0 +8,0 @@ |
@@ -42,3 +42,3 @@ // tooling | ||
module.exports.test = (node) => node.type === 'atrule' && node.name === 'nest' && node.parent && node.parent.type === 'rule' && comma(node.params).every( | ||
(selector) => selector.split('&').length === 2 && /&([^A-z]|$)/.test(selector) | ||
(selector) => selector.split('&').length === 2 && /&([^\w-]|$)/.test(selector) | ||
); |
@@ -28,3 +28,3 @@ // tooling | ||
module.exports.test = (node) => node.type === 'rule' && node.parent && node.parent.type === 'rule' && node.selectors.every( | ||
(selector) => selector.trim().lastIndexOf('&') === 0 && /^&([^A-z]|$)/.test(selector) | ||
(selector) => selector.trim().lastIndexOf('&') === 0 && /^&([^\w-]|$)/.test(selector) | ||
); |
{ | ||
"name": "postcss-nesting", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Nest style and media rules inside each another, following the CSS Nesting Module Level 3 specification", | ||
@@ -5,0 +5,0 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>", |
19671