Skip to content

Commit

Permalink
postcss-nesting: make edition 2024-02 the default (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed May 5, 2024
1 parent b16726d commit 086320b
Show file tree
Hide file tree
Showing 44 changed files with 453 additions and 2,709 deletions.
37 changes: 0 additions & 37 deletions plugin-packs/postcss-preset-env/test/_tape.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ postcssTape(plugin)({
browsers: 'ie >= 10',
},
},
'basic:ch88-ff78': {
message: 'uses :is pseudo for nesting with modern browsers { browsers: "chrome >= 88, firefox >= 78", stage: 0 }',
options: {
browsers: 'chrome >= 88, firefox >= 78',
stage: 0,
},
},
'basic:safari15': {
message: 'supports { browsers: "safari >= 15" } usage',
options: {
Expand All @@ -64,25 +57,6 @@ postcssTape(plugin)({
browsers: 'op_mini all',
},
},
'basic:ch88-ff78:no-is-pseudo': {
message: ':is pseudo for nesting can be disable with modern browsers { browsers: "chrome >= 88, firefox >= 78", stage: 0, features: { nesting-rules: { noIsPseudoSelector: true } } } usage',
options: {
browsers: 'chrome >= 88, firefox >= 78',
stage: 0,
features: {
'nesting-rules': {
noIsPseudoSelector: true,
},
},
},
},
'basic:ch88-ff78-saf10': {
message: 'does not use :is pseudo for nesting with an older browser { browsers: "chrome >= 88, firefox >= 78, safari >= 10", stage: 0 } usage',
options: {
browsers: 'chrome >= 88, firefox >= 78, safari >= 10',
stage: 0,
},
},
'basic:supports-query': {
message: 'supports { browsers: "defaults and supports css-variables" } usage',
options: {
Expand Down Expand Up @@ -142,17 +116,6 @@ postcssTape(plugin)({
},
},
},
'basic:nesting:noIsPseudoSelector:false': {
message: 'supports { stage: false, features: { "nesting-rules": { "noIsPseudoSelector": false } } } usage',
options: {
stage: false,
features: {
'nesting-rules': [true, {
noIsPseudoSelector: false,
}],
},
},
},
'basic:nesting:false': {
message: 'supports { stage: 0, features: { "nesting-rules": false } } usage',
options: {
Expand Down
15 changes: 11 additions & 4 deletions plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,32 @@

.test-nesting-rules {
order: 4;

order: 6;
}

.test-nesting-rules p {
order: 5;
}

.test-nesting-rules {

order: 6;
}

.test-nesting-rules,
#test-is-pseudo {
order: 7;

order: 9;
}

.test-nesting-rules:not(#does-not-exist) + p,#test-is-pseudo + p {
order: 8;
}

.test-nesting-rules,
#test-is-pseudo {

order: 9;
}

@media (max-width: 30em) {
.test-custom-media-queries {
order: 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,32 @@

.test-nesting-rules {
order: 4;

order: 6;
}

.test-nesting-rules p {
order: 5;
}

.test-nesting-rules {

order: 6;
}

.test-nesting-rules,
#test-is-pseudo {
order: 7;

order: 9;
}

.test-nesting-rules:not(#does-not-exist) + p,#test-is-pseudo + p {
order: 8;
}

.test-nesting-rules,
#test-is-pseudo {

order: 9;
}

@media (max-width: 30em) {
.test-custom-media-queries {
order: 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,32 @@

.test-nesting-rules {
order: 4;

order: 6;
}

.test-nesting-rules p {
order: 5;
}

.test-nesting-rules {

order: 6;
}

.test-nesting-rules,
#test-is-pseudo {
order: 7;

order: 9;
}

.test-nesting-rules:not(#does-not-exist) + p,#test-is-pseudo + p {
order: 8;
}

.test-nesting-rules,
#test-is-pseudo {

order: 9;
}

@media (max-width: 30em) {
.test-custom-media-queries {
order: 10;
Expand Down
15 changes: 11 additions & 4 deletions plugin-packs/postcss-preset-env/test/basic.ch38.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,32 @@

.test-nesting-rules {
order: 4;

order: 6;
}

.test-nesting-rules p {
order: 5;
}

.test-nesting-rules {

order: 6;
}

.test-nesting-rules,
#test-is-pseudo {
order: 7;

order: 9;
}

.test-nesting-rules:not(#does-not-exist) + p,#test-is-pseudo + p {
order: 8;
}

.test-nesting-rules,
#test-is-pseudo {

order: 9;
}

@media (max-width: 30em) {
.test-custom-media-queries {
order: 10;
Expand Down

0 comments on commit 086320b

Please sign in to comment.