postcss-minify-selectors
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -87,3 +87,4 @@ 'use strict'; | ||
function pseudo(selector) { | ||
if (selector.nodes.length === 1 && pseudoReplacements[selector.value]) { | ||
const value = selector.value.toLowerCase(); | ||
if (selector.nodes.length === 1 && pseudoReplacements[value]) { | ||
const first = selector.at(0); | ||
@@ -94,6 +95,6 @@ const one = first.at(0); | ||
selector.replaceWith(_postcssSelectorParser2.default.pseudo({ | ||
value: pseudoReplacements[selector.value] | ||
value: pseudoReplacements[value] | ||
})); | ||
} | ||
if (one.value === 'even') { | ||
if (one.value.toLowerCase() === 'even') { | ||
one.value = '2n'; | ||
@@ -105,3 +106,3 @@ } | ||
const three = first.at(2); | ||
if (one.value === '2n' && two.value === '+' && three.value === '1') { | ||
if (one.value.toLowerCase() === '2n' && two.value === '+' && three.value === '1') { | ||
one.value = 'odd'; | ||
@@ -126,3 +127,3 @@ two.remove(); | ||
}); | ||
if (~pseudoElements.indexOf(selector.value)) { | ||
if (~pseudoElements.indexOf(value)) { | ||
selector.value = selector.value.slice(1); | ||
@@ -138,3 +139,3 @@ } | ||
function tag(selector) { | ||
const { value } = selector; | ||
const value = selector.value.toLowerCase(); | ||
if ((0, _has2.default)(tagReplacements, value)) { | ||
@@ -141,0 +142,0 @@ selector.value = tagReplacements[value]; |
{ | ||
"name": "postcss-minify-selectors", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Minify selectors with PostCSS.", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.js", | ||
"has": "^1.0.0", | ||
"postcss": "^6.0.0", | ||
"postcss": "^7.0.0", | ||
"postcss-selector-parser": "^3.0.0" | ||
@@ -40,0 +40,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
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
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
11913
189
+ Addedpicocolors@0.2.1(transitive)
+ Addedpostcss@7.0.39(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedpostcss@6.0.23(transitive)
- Removedsupports-color@5.5.0(transitive)
Updatedpostcss@^7.0.0