Closed andruud closed 1 week ago
I think the insertRule
special-case is wrong, as per discussion... Parse declarations ~never fails (spec wise), it just returns an empty declaration list, so something like insertRule("yadayada")
would not throw, just create an empty CSSNestedDeclarations
object...
Easiest fix would be to check if the declaration list is not empty or so, though it seems that'd cause some other weird behavior like unknown-property: foo
throwing, but unknown-property: foo; color: red
working (and having a single declaration). I guess it's not too bad tho...
With that tweak or something along those lines resolved on by the CSSWG, this looks acceptable to me (kinda reluctantly).
I still think it's a really weird set-up, but given the discussions and that this is still better than the status quo, I guess positive is fine? Thanks for pushing this forward :)
I think the insertRule special-case is wrong
Yes, thanks, that was a mistake from my side.
(For the benefit of other people reading):
Easiest fix would be to check if the declaration list is not empty or so
Done: https://github.com/w3c/csswg-drafts/pull/10519
Filed https://github.com/w3c/csswg-drafts/issues/10520 to get a stamp for the above change, or to see if we should do something else instead.
Given all the above is resolved this looks good to me (still reluctantly since I think @nest
/ @group
was a simpler solution but...) :)
@emilio positive?
Yes
Request for Mozilla Position on an Emerging Web Specification
@
-mention GitHub accounts): @fantasai et al.Other information
See also:
@nest
: https://github.com/mozilla/standards-positions/issues/1013