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
As far as I understand the algorithm (which is defined in https://drafts.csswg.org/cssom-1/#serialize-a-css-rule, I believe—it seems to have been updated for nesting, and then a near-identical copy was pasted into the css-nesting-1 draft for CSSNestingRule), this should be serialized as:
This isn't optimal, by any stretch; not only is it hard to understand the nesting level of the innermost rule, but the second-to-last } also comes at an unexpected place. Could we perhaps have some sort of explicit string replacement? Or idea of nesting level? I don't know how these algorithms are usually defined to be as implementable as possible.
The text was updated successfully, but these errors were encountered:
Yes, the serialization algo for rules has been incredibly busted (not technically broken, just producing terrible output) for many, many years. You get the same result for nesting @media/@support/style rules today.
There's an example from the nesting-parsing.html test:
As far as I understand the algorithm (which is defined in https://drafts.csswg.org/cssom-1/#serialize-a-css-rule, I believe—it seems to have been updated for nesting, and then a near-identical copy was pasted into the css-nesting-1 draft for CSSNestingRule), this should be serialized as:
This isn't optimal, by any stretch; not only is it hard to understand the nesting level of the innermost rule, but the second-to-last } also comes at an unexpected place. Could we perhaps have some sort of explicit string replacement? Or idea of nesting level? I don't know how these algorithms are usually defined to be as implementable as possible.
The text was updated successfully, but these errors were encountered: