postcss-nesting
Advanced tools
Comparing version 10.2.0 to 11.0.0
import type { PluginCreator } from 'postcss'; | ||
declare type pluginOptions = { | ||
/** postcss-nesting plugin options */ | ||
export type pluginOptions = { | ||
/** Avoid the `:is()` pseudo class as much as possible. default: false */ | ||
noIsPseudoSelector?: boolean; | ||
@@ -4,0 +6,0 @@ }; |
import { options } from './options.js'; | ||
import { walkFunc } from './walk-func.js'; | ||
import type { AtRule, Rule } from 'postcss'; | ||
export default function atruleWithinRule(node: AtRule, parent: Rule, walk: walkFunc, opts: options): void; | ||
import type { AtRule, Result, Rule } from 'postcss'; | ||
export default function atruleWithinRule(node: AtRule, parent: Rule, result: Result, walk: walkFunc, opts: options): void; | ||
export declare function isAtruleWithinRule(node: AtRule): boolean; |
@@ -1,5 +0,5 @@ | ||
import type { AtRule, Rule } from 'postcss'; | ||
import type { AtRule, Result, Rule } from 'postcss'; | ||
import { walkFunc } from './walk-func.js'; | ||
import { options } from './options.js'; | ||
export default function transformNestRuleWithinRule(node: AtRule, parent: Rule, walk: walkFunc, opts: options): void; | ||
export default function transformNestRuleWithinRule(node: AtRule, parent: Rule, result: Result, walk: walkFunc, opts: options): void; | ||
export declare function isValidNestRuleWithinRule(node: AtRule): boolean; |
@@ -1,3 +0,3 @@ | ||
export declare type options = { | ||
export type options = { | ||
noIsPseudoSelector: boolean; | ||
}; |
@@ -1,4 +0,4 @@ | ||
import type { Rule } from 'postcss'; | ||
import type { Result, Rule } from 'postcss'; | ||
import { options } from './options.js'; | ||
export default function transformRuleWithinRule(node: Rule, parent: Rule, opts: options): void; | ||
export default function transformRuleWithinRule(node: Rule, parent: Rule, result: Result, opts: options): void; | ||
export declare function isValidRuleWithinRule(node: Rule): boolean; |
@@ -1,4 +0,4 @@ | ||
import type { Container } from 'postcss'; | ||
export declare type walkFunc = (node: Container, opts: { | ||
import type { Container, Result } from 'postcss'; | ||
export type walkFunc = (node: Container, result: Result, opts: { | ||
noIsPseudoSelector: boolean; | ||
}) => void; |
@@ -1,3 +0,3 @@ | ||
import type { Container } from 'postcss'; | ||
import type { Container, Result } from 'postcss'; | ||
import { options } from './options.js'; | ||
export default function walk(node: Container, opts: options): void; | ||
export default function walk(node: Container, result: Result, opts: options): void; |
{ | ||
"name": "postcss-nesting", | ||
"description": "Nest rules inside each other in CSS", | ||
"version": "10.2.0", | ||
"version": "11.0.0", | ||
"author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
@@ -12,3 +12,3 @@ "license": "CC0-1.0", | ||
"engines": { | ||
"node": "^12 || ^14 || >=16" | ||
"node": "^14 || ^16 || >=18" | ||
}, | ||
@@ -36,7 +36,8 @@ "main": "dist/index.cjs", | ||
"peerDependencies": { | ||
"postcss": "^8.2" | ||
"postcss": "^8.4" | ||
}, | ||
"scripts": { | ||
"build": "rollup -c ../../rollup/default.js", | ||
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"", | ||
"prebuild": "npm run clean", | ||
"build": "rollup -c ../../rollup/default.mjs", | ||
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"", | ||
"docs": "node ../../.github/bin/generate-docs/install.mjs", | ||
@@ -48,3 +49,2 @@ "lint": "npm run lint:eslint && npm run lint:package-json", | ||
"test": "node .tape.mjs && npm run test:exports", | ||
"test:deno": "deno run --unstable --allow-env --allow-read test/deno/test.js", | ||
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs", | ||
@@ -51,0 +51,0 @@ "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs" |
@@ -62,16 +62,5 @@ # PostCSS Nesting [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss] | ||
| [Node](INSTALL.md#node) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) | | ||
| --- | --- | --- | --- | --- | | ||
| [Node](INSTALL.md#node) | [Webpack](INSTALL.md#webpack) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) | | ||
| --- | --- | --- | --- | | ||
### Deno | ||
You can also use [PostCSS Nesting] on [Deno]: | ||
```js | ||
import postcss from "https://deno.land/x/postcss/mod.js"; | ||
import postcssNesting from "https://cdn.jsdelivr.net/npm/postcss-nesting@10/mod.js"; | ||
await postcss([postcssNesting]).process(YOUR_CSS /*, processOptions */); | ||
``` | ||
## Options | ||
@@ -193,5 +182,4 @@ | ||
[PostCSS Nesting]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting | ||
[Deno]: https://deno.land/x/postcss_nesting | ||
[PostCSS Nested]: https://github.com/postcss/postcss-nested | ||
[Sass]: https://sass-lang.com/ | ||
[CSS Nesting Module]: https://www.w3.org/TR/css-nesting-1/ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31179
113
0
23
184