Skip to content

Latest commit

 

History

History
100 lines (65 loc) · 1.7 KB

File metadata and controls

100 lines (65 loc) · 1.7 KB

Changes to PostCSS Nesting Experimental

Unreleased (major)

  • Updated: Support for Node 20.19.0 or later (major).
  • Removed: commonjs API. In supported Node versions require(esm) will work without needing to make code changes.

3.0.1

October 23, 2024

  • Updated: postcss-selector-parser

3.0.0

August 3, 2024

  • Updated: Support for Node v18+ (major).

2.0.1

December 15, 2023

  • Fix type definitions

2.0.0

January 24, 2023

  • Fix: Change how & is handled in functional pseudo classes in a non-nested context.
:has(&) {}

/* becomes */

- :has(:scope) {}
+ :has(:is(:root,:host)) {}
  • Updated: Support for Node v14+ (major).

1.1.1

November 16, 2022

  • Fix: Do not throw when a selector is invalid, show a warning instead.
  • Fix: Correctly handle declarations after nested rules.
/* 
	Example 7
	https://drafts.csswg.org/css-nesting/#mixing
*/
article {
	color: green;

+ 	color: red;
}
:is(article) {
		color: blue;
	}
- article {
- 	color: red;
- }

1.1.0

November 3, 2022

  • match Chrome's behavior for pseudo elements.
  • add support for & everywhere.
.foo {
  ::before {}
}

/* becomes */

.foo ::before {}

1.0.0

October 29, 2022

Implement the 28 October version of css-nestng-1

  • relative selector syntax
  • :is() pseudo is always used to de-sugar nesting
  • better support for @layer
  • remove @nest

Known issues :

  • selector invalidation works different (needs examples in README)
  • no support for @scope (needs media query parser)
  • invalid nesting has become more complex to detect with the new proposal. We are now transforming certain edge cases but also emitting a warning.