- Improved: support for mixins
- 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
- Added: support for
&at the root - Improved: support for mixins
- Implement latest specification
- relative selector syntax
@nestis 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.
- Improve
typesdeclaration inpackage.json
- Updated: Support for Node v14+ (major).
- Fix: Do not throw when a selector is invalid, show a warning instead.
- Removed: Support for Deno (breaking)
- Added: TypeScript typings
- 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.
- Fix selector order with any pseudo element.
- Fix semicolons being removed #497.
- Update
@csstools/selector-specificity(major)
- Add tentative support for
@layer. The actual behavior is poorly defined and may change in the future. Use with caution.
- Fix selector order with
:beforeand other pseudo elements.
- Use
@csstools/selector-specificityfor specificity calculations.
- Improved : compound selector order with pseudo elements
- Improved : selector specificity calculation.
- Avoid creating duplicate selectors containing only comments.
.alpha {
/* loose comment */
& .beta {
order: 1;
}
}
/* becomes */
- .alpha {
- /* loose comment */
- }
+ /* loose comment */
.alpha .beta {
order: 1;
}- Improved : selector specificity calculation
- Removed Sourcemaps from package tarball.
- Moved CLI to CLI Package. See announcement.
- Added:
noIsPseudoSelectorplugin option. - Changed:
:is()pseudo is now avoided as much as possible by default. - Updated: documentation
more info on noIsPseudoSelector
postcssNesting({
noIsPseudoSelector: true
})- Updated: documentation
- Fixed: Support for Deno. Ensuring we pack
mod.jsso it can be accessible by CDNs.
- 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.
-
Added: Support for
allowDeclarationsAfterNestedRulesto deviate from spec. -
Added:
.npmrcfile. -
Updated: Aligning completely with the spec updates.
-
Updated:
esbuildto 0.13.12 (minor) -
Removed: Support for PostCSS 7
- Added: Support for Deno
- Fixed: Issue with PostCSS 8 compatibility using the RuleExit listener
- Fixed: Compatibility issue with CommonJS.
- Updated: Support for PostCSS 8+.
- Updated: Support for Node v12+.
- Updated: Support for the
@containerat-rule.
- Fixed: Non-breaking issue with rules being unnecessarily split
- 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.
- Deprecated: Nested at-rules like
@mediawill no longer work in 7.0.0 - Refactored code to improve efficiency
- Refactored code to use Imports babel-transformed for Node v4 compatibility
- Updated: Exposing the transform function as its own for postcss-extend
- Added: Reduced splitting of rules
- Added: Mutation-safe walk method
- Improved: Complex selector validity testing
- Thanks: A special thanks to @JLHwung for these improvements
- Improved: Selector validity testing
- Changed: Transform only compliant nesting
- Added: Preserve more raws formatting
- Added: Node 4.x support
- Added: PostCSS 6 support
- Added: Preserved ordering
- Removed: Node 0.12 support
- Updated: Allow any direct nesting that follows the syntactic constraints
- Updated: PostCSS 5.0.6
- Updated: Tests
- Updated: Dependencies
- Updated: Project configuration
- Updated: JavaScript formatting, linting, tests, and documentation
- Updated: Properly concatenate at-rules with or expressions
- Updated: Update internal plugin name to postcss-nesting
- Added: Nesting of all at-rules
- Updated: Direct nesting order maintains order
- Updated: Tests and documentation
- Updated: Project conventions
- Added: Support for valid direct nesting
- Fixed: Issue with new PostCSS rules
- Updated: Nested rules source map to the parent rule
- Updated: PostCSS 5.0.9
- Updated: Tests and documentation
- Updated: Project configuration
- Updated: Map source raws
- Updated: Refactored plugin
- Updated: Tests
- Updated: PostCSS 5.0.6
- Fixed: Issue where the new rule’s children were not mapped to the parent internally
- Fixed: Issue where a
@nestrule followed by another bubbling at-rule would not bubble - Added: CONTRIBUTING.md
- Added: Requirement of
&per the specification - Added: New prefix option
- Added:
@documentand@supportsas bubbles - Updated: Documentation
- Added: New
@nestat-rule syntax - Updated: PostCSS 5
- Removed: Old inner bracket syntax
- Added: Initial release