October 23, 2024
- Make sorting compound selectors forwards compatible with potential future changes in
postcss-selector-parser
- Updated:
postcss-selector-parser
- Updated
@csstools/selector-resolve-nested
to3.0.0
(major) - Updated
@csstools/selector-specificity
to5.0.0
(major)
August 3, 2024
- Make edition
2024-02
the default (major). - Updated: Support for Node v18+ (major).
- Updated
@csstools/selector-resolve-nested
to2.0.0
(major) - Updated
@csstools/selector-specificity
to4.0.0
(major)
May 23, 2024
- Fix nested rules within
@scope
May 13, 2024
- Updated
@csstools/selector-specificity
to3.1.1
(patch)
May 11, 2024
- Updated
@csstools/selector-specificity
to3.1.0
(minor)
April 21, 2024
- Edition
2024-02
:- Do not rewrite selectors for declarations in conditional rules to a form with
:is()
- Do not rewrite selectors for declarations in conditional rules to a form with
This will work:
::before, ::after {
color: blue;
@media screen { color: cyan; }
}
This still wont work:
::before, ::after {
color: blue;
&:hover { color: cyan; }
}
March 31, 2024
- Updated
@csstools/selector-specificity
to3.0.3
(patch)
March 6, 2024
- Add the
edition
plugin option to control which CSS nesting specification version should be used. The default is2021
but you can also set it to the newer2024-02
edition to have more modern behavior.
February 26, 2024
- Fix order of final CSS with complex usage of both nesting and mixins, by @pciarach
February 19, 2024
- Updated
@csstools/selector-specificity
to3.0.2
(patch)
December 15, 2023
- Fix type definitions
- Updated
@csstools/selector-specificity
to3.0.1
(patch)
August 5, 2023
- Fix nesting of
@starting-style
rules
July 3, 2023
- Change license to
MIT-0
(read more about this change in the blog post) - Updated
@csstools/selector-specificity
to3.0.0
(major)
June 14, 2023
- Add support for nested selectors that that begin with a letter
- Add warning when using the deprecated
@nest
rule- you can silence this warning with a new
silenceAtNestWarning
plugin option - you can migrate your code to the latest syntax with our Stylelint Plugin
- you can silence this warning with a new
March 25, 2023
- Improved: support for mixins
February 16, 2023
- Skip nested rules that have a selector that begins with a letter
- Better warning when nested rules have a selector that begins with a letter
February 13, 2023
- Added: support for
&
at the root - Improved: support for mixins
January 31, 2023
- Implement latest specification
- relative selector syntax
@nest
is obsolete, all selectors can be written without it (sometimes you will need:is()
)- allow declarations after nested rules.
@nest
.
Future versions of this plugin will warn and then error on @nest
.
January 28, 2023
- Improve
types
declaration inpackage.json
January 24, 2023
- Updated: Support for Node v14+ (major).
- Fix: Do not throw when a selector is invalid, show a warning instead.
- Removed: Support for Deno (breaking)
September 14, 2022
- Added: TypeScript typings
June 30, 2022
- Partially revert the changes to pseudo element selectors from 10.1.9.
.anything::before {
@nest .something_else > & {
order: 1;
}
}
/* becomes */
- .something_else > :is(.anything::before) { /* 10.1.9 */
+ .something_else > .anything::before { /* previous and restored behavior */
order: 1;
}
The exact behavior of this pattern is unspecified and might change in the future. We are reverting to the previous behavior until the specification is clarified.
June 23, 2022
- Fix selector order with any pseudo element.
- Fix semicolons being removed #497.
June 4, 2022
- Update
@csstools/selector-specificity
(major)
May 20, 2022
- Add tentative support for
@layer
. The actual behavior is poorly defined and may change in the future. Use with caution.
May 17, 2022
- Fix selector order with
:before
and other pseudo elements.
May 11, 2022
- Use
@csstools/selector-specificity
for specificity calculations.
April 4, 2022
- Improved : compound selector order with pseudo elements
- Improved : selector specificity calculation.
March 4, 2022
- Avoid creating duplicate selectors containing only comments.
.alpha {
/* loose comment */
& .beta {
order: 1;
}
}
/* becomes */
- .alpha {
- /* loose comment */
- }
+ /* loose comment */
.alpha .beta {
order: 1;
}
January 12, 2022
- Improved : selector specificity calculation
January 2, 2022
- Removed Sourcemaps from package tarball.
- Moved CLI to CLI Package. See announcement.
December 22, 2021
- Added:
noIsPseudoSelector
plugin option. - Changed:
:is()
pseudo is now avoided as much as possible by default. - Updated: documentation
more info on noIsPseudoSelector
postcssNesting({
noIsPseudoSelector: true
})
December 13, 2021
- Updated: documentation
November 18, 2021
- Fixed: Support for Deno. Ensuring we pack
mod.js
so it can be accessible by CDNs.
November 17, 2021
- Removed: Support for
allowDeclarationsAfterNestedRules
.
We've realised that enforcing this rule from the spec was going to be problematic in the long run given how plugins work and the whole ecosystem around mixins and other features. Treating this as a patch given that this was introduced in the previous version and was starting to break projects that were using other features.
November 16, 2021
-
Added: Support for
allowDeclarationsAfterNestedRules
to deviate from spec. -
Added:
.npmrc
file. -
Updated: Aligning completely with the spec updates.
-
Updated:
esbuild
to 0.13.12 (minor) -
Removed: Support for PostCSS 7
October 27, 2021
- Added: Support for Deno
- Fixed: Issue with PostCSS 8 compatibility using the RuleExit listener
May 1, 2021
- Fixed: Compatibility issue with CommonJS.
April 26, 2021
- Updated: Support for PostCSS 8+.
- Updated: Support for Node v12+.
- Updated: Support for the
@container
at-rule.
July 29, 2018
- Fixed: Non-breaking issue with rules being unnecessarily split
September 17, 2018
- Updated: Support for PostCSS v7+
- Updated: Support for Node v6+
In a comment, a CSSWG member expressed interest in handling nested @media
while handling selector nesting. Since the specification has yet to be added
to the official CSSWG repository, nested at-rule deprecation is further delayed.
June 9, 2018
- Deprecated: Nested at-rules like
@media
will no longer work in 7.0.0 - Refactored code to improve efficiency
March 24, 2018
- Refactored code to use Imports babel-transformed for Node v4 compatibility
September 19, 2017
- Updated: Exposing the transform function as its own for postcss-extend
September 18, 2017
- Added: Reduced splitting of rules
August 19, 2017
- Added: Mutation-safe walk method
- Improved: Complex selector validity testing
- Thanks: A special thanks to @JLHwung for these improvements
May 22, 2017
- Improved: Selector validity testing
May 20, 2017
- Changed: Transform only compliant nesting
- Added: Preserve more raws formatting
May 8, 2017
- Added: Node 4.x support
- Added: PostCSS 6 support
- Added: Preserved ordering
- Removed: Node 0.12 support
March 16, 2016
- Updated: Allow any direct nesting that follows the syntactic constraints
- Updated: PostCSS 5.0.6
- Updated: Tests
- Updated: Dependencies
- Updated: Project configuration
February 20, 2016
- Updated: JavaScript formatting, linting, tests, and documentation
- Updated: Properly concatenate at-rules with or expressions
- Updated: Update internal plugin name to postcss-nesting
January 30, 2016
- Added: Nesting of all at-rules
- Updated: Direct nesting order maintains order
- Updated: Tests and documentation
January 3, 2016
- Updated: Project conventions
January 3, 2016
- Added: Support for valid direct nesting
October 15, 2015
- Fixed: Issue with new PostCSS rules
October 12, 2015
- Updated: Nested rules source map to the parent rule
- Updated: PostCSS 5.0.9
- Updated: Tests and documentation
- Updated: Project configuration
September 23, 2015
- Updated: Map source raws
September 22, 2015
- Updated: Refactored plugin
- Updated: Tests
- Updated: PostCSS 5.0.6
September 16, 2015
- Fixed: Issue where the new rule’s children were not mapped to the parent internally
September 16, 2015
- Fixed: Issue where a
@nest
rule followed by another bubbling at-rule would not bubble - Added: CONTRIBUTING.md
September 16, 2015
- Added: Requirement of
&
per the specification - Added: New prefix option
- Added:
@document
and@supports
as bubbles - Updated: Documentation
September 15, 2015
- Added: New
@nest
at-rule syntax - Updated: PostCSS 5
- Removed: Old inner bracket syntax
June 17, 2015
- Added: Initial release