Steinar H. Gunderson
Steinar H. Gunderson
CSS within HTML has the same problem; the entire tag is diffed as a single token. git diff does much better here. 
It seems this is possible to do with tree-sitter's subrange parsers. Prototype before/after: 
Another suggestion: Can we just drop this entire demand? I don't see a good rationale for it, and it complicates parsing (we need to remember whether any nested rules have...
Yes, I'm fine with not preserving order of appearance. The spec already says that nested rules are taken to apply as if they were written after the parent rule, so...
I'm wondering if we should say something like: If the first non-comment token in a @media (or @supports, etc.) block is not a & or an at-rule, the entire block...
It could, but you'd end up with a pretty weird un-orthogonality, if you suddenly have rules that are to be ignored (but otherwise correctly parsed, visible through CSSOM etc.). You...
You want to parse `@media` differently depending on the context it's in? I'm not sure if that's ideal either.
> It'll go on a .style in CSSMediaRule (not yet defined by the spec). The MQ spec, or the nesting spec? What happens if you set e.g. .style.color on a...
We implemented the rule of implicit & {} in Blink, and I think the end result is good enough that the spec should strongly consider adopting it. It gave us:...
> I’m fine with implicitly wrapping with & {} if it makes it easier to implement, but it should be removed in serialization / CSSOM per our current principle about...