Socket
Socket
Sign inDemoInstall

@csstools/postcss-is-pseudo-class

Package Overview
Dependencies
8
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.3 to 4.0.4

142

CHANGELOG.md
# Changes to PostCSS Is Pseudo Class
### 4.0.4
_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.3

@@ -15,135 +22,2 @@

### 4.0.1
_September 2, 2023_
- Fix substitution when selectors have mixed types for compound selectors where one of two parts is a `:is()` pseudo class.
```diff
header:is(.a .b) {}
/* becomes : */
- header.a .b {}
+ .a header.b {}
```
### 4.0.0
_July 3, 2023_
- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/))
- Updated [`@csstools/selector-specificity`](https://github.com/csstools/postcss-plugins/tree/main/packages/selector-specificity) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/selector-specificity/CHANGELOG.md#300) (major)
### 3.2.1
_May 19, 2023_
- Fix compound selectors with `*`.
```diff
:is(.a *):is(h1, h2, h3) {}
/* becomes : */
- .a *h1, .a *h2, .a *h3 {}
+ .a h1, .a h2, .a h3 {}
```
### 3.2.0
_April 10, 2023_
- Add support for more complex selector patterns. In particular anything where `:is()` is in the left-most compound selector.
### 3.1.1
_February 8, 2023_
- Reduce the amount of duplicate fallback CSS.
### 3.1.0
_February 2, 2023_
- Fix is pseudo inside a not pseudo (`:not(:is(h1, h2, h3))`)
- Reduce the output size when all selectors are known to be valid
### 3.0.1
_January 28, 2023_
- Improve `types` declaration in `package.json`
### 3.0.0
_January 24, 2023_
- Updated: Support for Node v14+ (major).
### 2.0.7
_July 8, 2022_
- Fix case insensitive matching.
### 2.0.6
_June 23, 2022_
- Fix selector order with any pseudo element.
- Fix transforming pseudo elements in `:is()`. Following the specification pseudo elements are invalid and we now transform to a known invalid pseudo element.
- Add `onPseudoElement` plugin option. Set `{ onPseudoElement: 'warning' }` to receive warnings when this plugin encounters an unprocessable pseudo element.
### 2.0.5
_June 4, 2022_
- Update `@csstools/selector-specificity` (major)
### 2.0.4
_May 17, 2022_
- Fix selector order with `:before` and other pseudo elements.
### 2.0.3
_May 11, 2022_
- Use `@csstools/selector-specificity` for specificity calculations.
### 2.0.2
_April 4, 2022_
- Improved : compound selector order with pseudo elements
- Improved : selector specificity calculation.
### 2.0.1
_March 4, 2022_
- Preserve selector order as much as possible. Fixes issues where pseudo elements `::before` were moved.
### 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_
- Fix selector order
### 1.0.0
_January 13, 2022_
- initial release
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-is-pseudo-class/CHANGELOG.md)

14

dist/index.d.ts
import type { PluginCreator } from 'postcss';
declare const creator: PluginCreator<pluginOptions>;
export default creator;
/** postcss-is-pseudo-class plugin options */
export type pluginOptions = {
export declare type pluginOptions = {
/** Preserve the original notation. default: false */

@@ -9,3 +13,3 @@ preserve?: boolean;

* default: _not set_
*/
*/
onComplexSelector?: 'warning';

@@ -15,3 +19,3 @@ /**

* default: _not set_
*/
*/
onPseudoElement?: 'warning';

@@ -24,3 +28,3 @@ /**

};
declare const creator: PluginCreator<pluginOptions>;
export default creator;
export { }
{
"name": "@csstools/postcss-is-pseudo-class",
"description": "A pseudo-class for matching elements in a selector list",
"version": "4.0.3",
"version": "4.0.4",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",

@@ -20,11 +20,14 @@ "license": "MIT-0",

},
"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"
}
}

@@ -39,3 +42,3 @@ },

"dependencies": {
"@csstools/selector-specificity": "^3.0.0",
"@csstools/selector-specificity": "^3.0.1",
"postcss-selector-parser": "^6.0.13"

@@ -46,15 +49,2 @@ },

},
"devDependencies": {
"@csstools/postcss-tape": "*",
"puppeteer": "^21.3.6"
},
"scripts": {
"build": "rollup -c ../../rollup/default.mjs",
"docs": "node ../../.github/bin/generate-docs/install.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-is-pseudo-class#readme",

@@ -76,10 +66,3 @@ "repository": {

"selector"
],
"csstools": {
"exportName": "postcssIsPseudoClass",
"humanReadableName": "PostCSS Is Pseudo"
},
"volta": {
"extends": "../../package.json"
}
]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc