@csstools/postcss-is-pseudo-class
Advanced tools
Comparing version 1.0.1 to 2.0.0
# Changes to PostCSS Is Pseudo Class | ||
### 2.0.0 (January 31, 2022) | ||
- Remove `skip` flag in `onComplexSelectors` option. | ||
If a complex selector is encountered that has no known equivalent, it will always be skipped and preserved now. | ||
The previous behavior was to remove `:is()` even if that broke the selector. | ||
### 1.0.1 (January 17, 2022) | ||
@@ -4,0 +12,0 @@ |
import type { PluginCreator } from 'postcss'; | ||
declare const creator: PluginCreator<{ | ||
preserve?: boolean; | ||
onComplexSelector?: 'warning' | 'skip'; | ||
onComplexSelector?: 'warning'; | ||
specificityMatchingName?: string; | ||
}>; | ||
export default creator; |
@@ -1,1 +0,3 @@ | ||
export declare function childAdjacentChild(selector: any): void; | ||
export default function complexSelectors(selectors: string[], pluginOptions: { | ||
onComplexSelector?: 'warning'; | ||
}, warnFn: () => void): string[]; |
export default function splitSelectors(selectors: string[], pluginOptions: { | ||
preserve?: boolean; | ||
onComplexSelector?: 'warning' | 'skip'; | ||
specificityMatchingName: string; | ||
}, warnFn: () => void): string[]; | ||
}, recursionDepth?: number): any[]; |
{ | ||
"name": "@csstools/postcss-is-pseudo-class", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "A pseudo-class for matching elements in a selector list", | ||
@@ -34,15 +34,26 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"stryker": "stryker run --logLevel error", | ||
"test": "postcss-tape --ci && npm run test:exports", | ||
"test": "node .tape.mjs && npm run test:exports", | ||
"test:browser": "node ./test/_browser.mjs", | ||
"test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs", | ||
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs" | ||
}, | ||
"dependencies": { | ||
"postcss-selector-parser": "^6.0.8" | ||
"postcss-selector-parser": "^6.0.9" | ||
}, | ||
"peerDependencies": { | ||
"postcss": "^8.4" | ||
}, | ||
"devDependencies": { | ||
"postcss": "^8.3.6", | ||
"postcss-tape": "^6.0.1" | ||
"puppeteer": "^13.1.2" | ||
}, | ||
"peerDependencies": { | ||
"postcss": "^8.3" | ||
}, | ||
"keywords": [ | ||
"postcss", | ||
"css", | ||
"postcss-plugin", | ||
"matches", | ||
"is", | ||
"selector", | ||
"polyfill", | ||
"pseudo" | ||
], | ||
"repository": { | ||
@@ -49,0 +60,0 @@ "type": "git", |
@@ -6,3 +6,3 @@ # PostCSS Is Pseudo [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss] | ||
[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] | ||
[![Support Chat][git-img]][git-url] | ||
[<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord] | ||
@@ -132,10 +132,2 @@ [PostCSS Is Pseudo Class] lets you use the `:is` pseudo class function, following the | ||
Do not transform complex selectors in `:is` pseudo classes. | ||
```js | ||
postcss([ | ||
postcssIsPseudoClass({ onComplexSelector: 'skip' }) | ||
]).process(YOUR_CSS /*, processOptions */); | ||
``` | ||
Warn on complex selectors in `:is` pseudo classes. | ||
@@ -231,4 +223,3 @@ | ||
[css-url]: https://cssdb.org/#is-pseudo-class | ||
[git-img]: https://img.shields.io/badge/support-chat-blue.svg | ||
[git-url]: https://gitter.im/postcss/postcss | ||
[discord]: https://discord.gg/bUadyRwkJS | ||
[npm-img]: https://img.shields.io/npm/v/@csstools/postcss-is-pseudo-class.svg | ||
@@ -235,0 +226,0 @@ [npm-url]: https://www.npmjs.com/package/@csstools/postcss-is-pseudo-class |
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
29342
1
13
78
228