Conversation
| // Merge any logical/conditional rules from nested declarations back into the parent context. | ||
| // These will be collected by the caller when generating additional rules for this style rule. | ||
| let child_context = std::mem::replace(&mut context.handler_context, handler_context); | ||
| context.handler_context.merge(child_context); |
There was a problem hiding this comment.
I would have thought that when the nested rules get minified, the child context would get reset after the additional rules are generated. Seems like somehow that's not happening in this case?
Seems like the issue only occurs when the nested rules are before declarations, not after. This may have been caused when the spec got updated to allow intermixing rules and declarations (initially nested rules had to be after declarations). Now there is a hidden NestedDeclarations rule for these interleaved declarations. Maybe that case needs to be updated to work similarly to StyleRule (inserting additional rules after)? Otherwise what happens if you have nested rules followed by declarations followed by more rules? I guess the order of where those additional rules for logical properties get inserted might be important (right now they might all get pushed to the end)?
Closes #1049