Skip to content

Commit 483f85c

Browse files
authored
case insensitive processing and consistent cloning (#502)
* wip * color() * some more plugins * fix * a few more * postcss-font-format-keywords * gap properties * hwb and design tokens * more * update test expect files * more updates * more updates * a few more * finish up * changelog * final fixes * clarify
1 parent 1ed0052 commit 483f85c

File tree

176 files changed

+1236
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+1236
-427
lines changed

.github/labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@
164164
- plugins/postcss-pseudo-class-any-link/**
165165
- experimental/postcss-pseudo-class-any-link/**
166166

167-
"plugins/postcss-rebeccapurple":
168-
- plugins/postcss-rebeccapurple/**
169-
- experimental/postcss-rebeccapurple/**
167+
"plugins/postcss-color-rebeccapurple":
168+
- plugins/postcss-color-rebeccapurple/**
169+
- experimental/postcss-color-rebeccapurple/**
170170

171171
"plugins/postcss-replace-overflow-wrap":
172172
- plugins/postcss-replace-overflow-wrap/**

package-lock.json

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/selector-specificity/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes to Selector Specificity
22

3+
### Unreleased
4+
5+
- Fix case insensitive matching.
6+
37
### 2.0.1 (June 10, 2022)
48

59
- Fixed: Exception on `:nth-child` without arguments. [#439](https://github.com/csstools/postcss-plugins/issues/439)

packages/selector-specificity/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function selectorSpecificity(node: Node): Specificity {
3939
} else if (isPseudoElement(node)) {
4040
c += 1;
4141
} else if (parser.isPseudoClass(node)) {
42-
switch (node.value) {
42+
switch (node.value.toLowerCase()) {
4343
case ':-moz-any':
4444
case ':-webkit-any':
4545
case ':any':
@@ -74,7 +74,7 @@ export function selectorSpecificity(node: Node): Specificity {
7474

7575
if (node.nodes && node.nodes.length > 0) {
7676
const ofSeparatorIndex = node.nodes[0].nodes.findIndex((x) => {
77-
return x.type === 'tag' && x.value === 'of';
77+
return x.type === 'tag' && x.value.toLowerCase() === 'of';
7878
});
7979

8080
if (ofSeparatorIndex > -1) {

plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@
518518
text-indent: 2em;
519519
content: var(--value-2ic);
520520
left: 2em;
521-
left: 2em;
522521
left: var(--non-existing, 2em);
523522
width: calc(8em + 20px);
524523
height: 10px;

plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@
518518
text-indent: 2em;
519519
content: var(--value-2ic);
520520
left: 2em;
521-
left: 2em;
522521
left: var(--non-existing, 2em);
523522
width: calc(8em + 20px);
524523
height: 10px;

plugin-packs/postcss-preset-env/test/basic.ch38.expect.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@
438438
text-indent: 2em;
439439
content: var(--value-2ic);
440440
left: 2em;
441-
left: 2em;
442441
left: var(--non-existing, 2em);
443442
width: calc(8em + 20px);
444443
height: 10px;

plugin-packs/postcss-preset-env/test/basic.expect.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,6 @@
541541
text-indent: 2em;
542542
content: var(--value-2ic);
543543
left: 2em;
544-
left: 2em;
545544
left: var(--non-existing, 2em);
546545
width: calc(8em + 20px);
547546
height: 10px;

plugin-packs/postcss-preset-env/test/basic.ie10.expect.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@
557557
text-indent: 2em;
558558
content: var(--value-2ic);
559559
left: 2em;
560-
left: 2em;
561560
left: var(--non-existing, 2em);
562561
width: calc(8em + 20px);
563562
height: 10px;

plugin-packs/postcss-preset-env/test/basic.nesting.false.expect.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,6 @@ h1.test-custom-selectors,h2.test-custom-selectors,h3.test-custom-selectors,h4.te
539539
text-indent: 2em;
540540
content: var(--value-2ic);
541541
left: 2em;
542-
left: 2em;
543542
left: var(--non-existing, 2em);
544543
width: calc(8em + 20px);
545544
height: 10px;

0 commit comments

Comments
 (0)