Bug with `@nest` and `&`
Closed this issue ยท 8 comments
Input:
.de {
@nest
.cd:not(:hover, :focus) & {
& .fg {
color: red;
}
}
}Output:
.de .cd:not(:hover .fg
:focus) .de .fg
Expected:
.de
.cd:not(:hover):not(:focus) .de
.cd:not(:hover):not(:focus) .de .fg
Original issue: stylelint/stylelint#2453
@evilebottnawi: I spent some time this morning trying to sort this out ... posted PR #2 with my progress โ but it's not there yet. Would you like to take over ownership of this module? I am not interested in nesting in CSS, and would rather this module were maintained by someone who is.
@davidtheclark I would be happy to help but it is also extremely loaded, we can try it contribute together when someone has time
I am not interested in nesting in CSS, and would rather this module were maintained by someone who is.
Are you open to moving this package to the @csstools org?
We already have a bunch of packages related to CSS selectors and nesting : https://github.com/csstools/postcss-plugins/tree/main/packages
We don't mind maintaining this as there are still quite some dependents and improving this package would allow us to resolve some bugs in Stylelint.
Given recent events I understand any hesitation around changes in maintainers or owners but this would not be a new vector, packages maintained by the @csstools org are already everywhere. Having a centralized place of work reduces the amount of (unpaid) work for us.
@romainmenke I am happy to transfer ownership. Since I cannot send it directly to the csstools org, should I transfer to you, @romainmenke, and you can take it from there?
Awesome! Thank you for being open to this @davidtheclark ๐
We will take good care of it.
Yes, transferring to me, as an intermediate step, is ok :)
Almost forgot, my npm username is also romainmenke, but if possible to transfer to orgs directly then it would be csstools
Transfer is complete ๐
This has been resolved.
Also updated all dependencies, migrated to GitHub Actions, ...
We can no longer test against postcss-nesting as the spec has changed too much and it no long aligns with postcss-nested.