Skip to content

postcss-preset-env : add cascade layers #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions plugin-packs/postcss-preset-env/.tape.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ postcssTape(plugin)({
browsers: '> 0%'
},
},
'layers-basic': {
message: 'supports layers usage',
options: {
stage: 0,
browsers: '> 0%'
},
},
'layers-basic:preserve:true': {
message: 'supports layers usage with { preserve: true }',
options: {
preserve: true,
stage: 0,
browsers: '> 0%'
},
},
'client-side-polyfills:stage-1': {
message: 'stable client side polyfill behavior',
options: {
Expand Down
4 changes: 4 additions & 0 deletions plugin-packs/postcss-preset-env/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes to PostCSS Preset Env

### Unreleased

- Added `@csstools/postcss-cascade-layers` <br/> [Check the plugin README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-cascade-layers#readme) for usage details.

### 7.5.0 (May 2, 2022)

- Added `@csstools/postcss-unset-value` <br/> [Check the plugin README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-unset-value#readme) for usage details.
Expand Down
1 change: 1 addition & 0 deletions plugin-packs/postcss-preset-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"dist"
],
"dependencies": {
"@csstools/postcss-cascade-layers": "^1.0.0",
"@csstools/postcss-color-function": "^1.1.0",
"@csstools/postcss-font-format-keywords": "^1.0.0",
"@csstools/postcss-hwb-function": "^1.0.0",
Expand Down
5 changes: 5 additions & 0 deletions plugin-packs/postcss-preset-env/scripts/plugins-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,10 @@
"packageName": "@csstools/postcss-unset-value",
"id": "unset-value",
"importName": "postcssUnsetValue"
},
{
"packageName": "@csstools/postcss-cascade-layers",
"id": "cascade-layers",
"importName": "postcssCascadeLayers"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ export default [
'overflow-wrap-property',
'place-properties',
'system-ui-font-family',
'cascade-layers',
];
2 changes: 2 additions & 0 deletions plugin-packs/postcss-preset-env/src/plugins/plugins-by-id.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import postcssInitial from 'postcss-initial';
import postcssPseudoClassAnyLink from 'postcss-pseudo-class-any-link';
import postcssBlankPseudo from 'css-blank-pseudo';
import postcssPageBreak from 'postcss-page-break';
import postcssCascadeLayers from '@csstools/postcss-cascade-layers';
import postcssAttributeCaseInsensitive from 'postcss-attribute-case-insensitive';
import postcssClamp from 'postcss-clamp';
import postcssColorFunction from '@csstools/postcss-color-function';
Expand Down Expand Up @@ -47,6 +48,7 @@ export const pluginsById = new Map(
['any-link-pseudo-class', postcssPseudoClassAnyLink],
['blank-pseudo-class', postcssBlankPseudo],
['break-properties', postcssPageBreak],
['cascade-layers', postcssCascadeLayers],
['case-insensitive-attributes', postcssAttributeCaseInsensitive],
['clamp', postcssClamp],
['color-function', postcssColorFunction],
Expand Down
5 changes: 5 additions & 0 deletions plugin-packs/postcss-preset-env/src/plugins/plugins-data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,9 @@ export default [
'id': 'unset-value',
'importName': 'postcssUnsetValue',
},
{
'packageName': '@csstools/postcss-cascade-layers',
'id': 'cascade-layers',
'importName': 'postcssCascadeLayers',
},
];
Loading