Not planned
Description
Bug description
With the 13.0.0 update, the Angular ::ng-deep
selector no longer is nestable
i.e.
::ng-deep {
.some-class {
}
}
the above used to work, but the only way i've gotten it to work since 13.0.0 is to not nest
::ng-deep .some-class {
}
the work around isn't that terrible, but is it annoying that the nesting plugin is forcing me to avoid nesting in certain situations.
Source CSS
::ng-deep {
.some-class {
}
}
Expected CSS
::ng-deep {
.some-class {
}
}
Actual CSS
doesn't appear to be outputted at all anymore
Playgound example
No response
Does it happen with npx @csstools/csstools-cli <plugin-name> minimal-example.css
?
None
Debug output
No response
Extra config
No response
What plugin are you experiencing this issue on?
No response
Plugin version
13.0.0
What OS are you experiencing this on?
macOS
Node Version
22.12.0
Validations
- Follow our Code of ConductCheck that there isn't already an issue that request the same feature to avoid creating a duplicate.
Would you like to open a PR for this bug?
- I'm willing to open a PR
Activity
[-]postcss-nesting[/-][+]postcss-nesting not generating with ::ng-deep nested nodes[/+]romainmenke commentedon May 12, 2025
::ng-deep
is not a standard selector.postcss-nesting
only supports standard CSS.This is not something we can fix or help you with.
I also don't know anything about Angular so I can't really give any guidance.
kstrasters-pj commentedon May 12, 2025
I understand it's non standard, but it was working prior to this update, i figured y'all might be interested in knowing that.
I have tested this with Angular css native and it works jsut fine as well. So it is specifically related to the package update, or one of the downstream updates.
Feel free to mark as won't-fix or something, but was jsut trying to provide some information, or a place for someone else to find down the road
romainmenke commentedon May 12, 2025
Yeah, anything non-standard like this
::ng-deep
selector is always at risk of breakage.In this case it is communicating that it is a pseudo element by having a double
::
.Pseudo element selectors can't be used with CSS nesting.
This won't work either: