You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a, b {
color: red;
}
a c, a d, b c, b d {
color: white;
}
Could become
a, b {
color: red;
& c, & d {
color: white;
}
}
(yes I took their example and reversed it).
Describe the solution you would like
For projects that wanted to reduce their CSS for browsers that supported it, writing nested CSS could reduce the amount of bytes.
There should be some way of statically analyzing CSS selectors and seeing which parts of selectors are duplicated and could be inlined, but even if it works only in some instances, if it had enough byte benefit it would be worth doing.
Possible alternatives
No response
Additional context
This is most useful for authoring formats like Sass which use a different style of nesting. It seems like Sass offering native-nested CSS output is out of scope for their team priorities.
Users who don't write Sass don't typically need this - they could write native CSS nesting and use postcss plugins to transform it to vanilla CSS in browsers that didn't support it.
Are you willing to work on this?
Yes, I would like to help
The text was updated successfully, but these errors were encountered:
What should be improved?
This would be the reverse operation as something like https://github.com/csstools/postcss-nesting
Could become
(yes I took their example and reversed it).
Describe the solution you would like
For projects that wanted to reduce their CSS for browsers that supported it, writing nested CSS could reduce the amount of bytes.
There should be some way of statically analyzing CSS selectors and seeing which parts of selectors are duplicated and could be inlined, but even if it works only in some instances, if it had enough byte benefit it would be worth doing.
Possible alternatives
No response
Additional context
This is most useful for authoring formats like Sass which use a different style of nesting. It seems like Sass offering native-nested CSS output is out of scope for their team priorities.
Users who don't write Sass don't typically need this - they could write native CSS nesting and use postcss plugins to transform it to vanilla CSS in browsers that didn't support it.
Are you willing to work on this?
The text was updated successfully, but these errors were encountered: