@csstools/postcss-cascade-layers
Advanced tools
Comparing version 4.0.1 to 4.0.2
# Changes to PostCSS Cascade Layers | ||
### 4.0.2 | ||
_December 15, 2023_ | ||
- Fix type definitions | ||
- Updated [`@csstools/selector-specificity`](https://github.com/csstools/postcss-plugins/tree/main/packages/selector-specificity) to [`3.0.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/selector-specificity/CHANGELOG.md#301) (patch) | ||
### 4.0.1 | ||
@@ -16,79 +23,2 @@ | ||
### 3.0.1 | ||
_January 28, 2023_ | ||
- Improve `types` declaration in `package.json` | ||
### 3.0.0 | ||
_January 24, 2023_ | ||
- Run `postcss-cascade-layers` late compared to other PostCSS plugins (breaking) | ||
_This will be the last time we change this after several times back and forth. | ||
We are sticking with this configuration now._ | ||
### 2.0.0 | ||
_November 14, 2022_ | ||
- Run `postcss-cascade-layers` early compared to other PostCSS plugins (breaking) | ||
- Updated: Support for Node v14+ (major). | ||
- Fix: Do not throw when a selector is invalid, show a warning instead. | ||
### 1.1.1 | ||
_September 17, 2022_ | ||
- Fix pre-defined layer order in nested `@layer` rules. | ||
### 1.1.0 | ||
_September 14, 2022_ | ||
- Add support for `@scope` and `@container` as parent rules for `@layer` | ||
### 1.0.6 | ||
_September 7, 2022_ | ||
- Fix broken `@keyframes` in `@layer`. | ||
### 1.0.5 | ||
_July 8, 2022_ | ||
- Fix case insensitive `@layer` matching (`@LaYeR`). | ||
- Updated `@csstools/selector-specificity` to `2.0.2` (patch) | ||
### 1.0.4 | ||
_June 23, 2022_ | ||
- Fix selector order with any pseudo element. This plugin will no longer re-order selectors. | ||
### 1.0.3 | ||
_June 4, 2022_ | ||
- Update `@csstools/selector-specificity` (major) | ||
### 1.0.2 | ||
_May 20, 2022_ | ||
- Use only simple `:not(#\#)` selectors to adjust specificity. | ||
### 1.0.1 | ||
_May 17, 2022_ | ||
- Process CSS after most other plugins to ensure correct analysis and transformation of sugary CSS. | ||
- Fix selector order with `:before` and other pseudo elements. | ||
### 1.0.0 | ||
_May 12, 2022_ | ||
- Initial version | ||
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-cascade-layers/CHANGELOG.md) |
import type { PluginCreator } from 'postcss'; | ||
import type { pluginOptions } from './options'; | ||
export type { pluginOptions } from './options'; | ||
declare const creator: PluginCreator<pluginOptions>; | ||
export default creator; | ||
/** postcss-cascasde-layers plugin options */ | ||
export declare type pluginOptions = { | ||
/** Emit a warning when the "revert" keyword is found in your CSS. default: "warn" */ | ||
onRevertLayerKeyword?: 'warn' | false; | ||
/** Emit a warning when conditional rules could change the layer order. default: "warn" */ | ||
onConditionalRulesChangingLayerOrder?: 'warn' | false; | ||
/** Emit a warning when "layer" is used in "@import". default: "warn" */ | ||
onImportLayerRule?: 'warn' | false; | ||
}; | ||
export { } |
{ | ||
"name": "@csstools/postcss-cascade-layers", | ||
"description": "Use cascade layers in CSS", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"contributors": [ | ||
@@ -38,11 +38,14 @@ { | ||
}, | ||
"type": "module", | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.mjs" | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.mjs" | ||
}, | ||
"require": { | ||
"default": "./dist/index.cjs" | ||
} | ||
} | ||
@@ -57,3 +60,3 @@ }, | ||
"dependencies": { | ||
"@csstools/selector-specificity": "^3.0.0", | ||
"@csstools/selector-specificity": "^3.0.1", | ||
"postcss-selector-parser": "^6.0.13" | ||
@@ -64,16 +67,2 @@ }, | ||
}, | ||
"devDependencies": { | ||
"@csstools/postcss-bundler": "^1.0.3", | ||
"@csstools/postcss-tape": "*", | ||
"puppeteer": "^21.4.1" | ||
}, | ||
"scripts": { | ||
"build": "rollup -c ../../rollup/default.mjs", | ||
"docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs", | ||
"lint": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run build && npm run test", | ||
"test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs", | ||
"test:browser": "node ./test/_browser.mjs", | ||
"test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs" | ||
}, | ||
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-cascade-layers#readme", | ||
@@ -94,13 +83,3 @@ "repository": { | ||
"specificity" | ||
], | ||
"csstools": { | ||
"assumesToProcessBundledCSS": true, | ||
"cssdbId": "cascade-layers", | ||
"exportName": "postcssCascadeLayers", | ||
"humanReadableName": "PostCSS Cascade Layers", | ||
"specUrl": "https://www.w3.org/TR/css-cascade-5/#layering" | ||
}, | ||
"volta": { | ||
"extends": "../../package.json" | ||
} | ||
] | ||
} |
@@ -88,5 +88,6 @@ # PostCSS Cascade Layers [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS] | ||
⚠️ For this to work the plugin needs to analyze your entire stylesheet at once.<br> | ||
If you have different assets that are unaware of each other it will not work correctly as the analysis will be incorrect. | ||
> [!IMPORTANT] | ||
> [PostCSS Cascade Layers] assumes to process your complete CSS bundle.<br>If your build tool processes files individually or processes files in parallel the output will be incorrect.<br>Using [`@csstools/postcss-bundler`](https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler) and `@import` statements is one way to make sure your CSS is bundled before it is processed by this plugin. | ||
## Usage | ||
@@ -93,0 +94,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
0
208
0
Yes
31004
7
95