-
Notifications
You must be signed in to change notification settings - Fork 708
[css-nesting] Why does CSSStyleRule not inherit from CSSGroupingRule? #8940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @mdubet |
I've asked the same question during a WG meeting : #8350 (comment) |
I honestly just didn't think about changing the inheritance tree? It feels like doing that to such an old rule might have compat implications, but then again CSSMediaRule is just as old and we changed it. So yeah, probably we can just do it this way. |
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> emilio: Nesting spec extends CSSSTyleRule by copypasting CSSGroupingRule API<TabAtkins> emilio: Think there was a point in the past we discussed enhancing CSSSTyleRule but discarded that <TabAtkins> emilio: So maybe instead we could have CSSStyleRule inherit from CSSGroupingRule? Then enhancements from either come to both. <TabAtkins> emilio: Would make it more likely that changes (like using observablearray) would apply to both <TabAtkins> emilio: This is all assuming there's no compat impact. <TabAtkins> emilio: Assuming that, I think this is the right thing to do. <TabAtkins> No objections from me, modulo possible compat impact we'll find. <TabAtkins> (it would be *relatively* hard to have a compat impact here, I imagine) <TabAtkins> astearns: Objections? <TabAtkins> RESOLVED: Change CSSStyleRule to inherit from CSSGroupingRule, modulo any discovered compat impact <TabAtkins> emilio: I'd also expect compat to be rare <TabAtkins> emilio: Few people use instanceof, they use duck-typing <TabAtkins> emilio: And we shipped .cssRules on CSSStyleRule without issue |
…gRule, so remove the now extraneous definitions from Nesting.
As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1846251 gecko-commit: 085c31f150d35371620bb3f884c9f20b396dbe08 gecko-reviewers: peterv, devtools-reviewers
…v,devtools-reviewers As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930
…v,devtools-reviewers As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930
As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1846251 gecko-commit: 62534bac923526d52c2d5f377d00bdf2d34b9a05 gecko-reviewers: peterv, devtools-reviewers
As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1846251 gecko-commit: 62534bac923526d52c2d5f377d00bdf2d34b9a05 gecko-reviewers: peterv, devtools-reviewers
This has tests now, and spec text, so closing. FWIW Gecko shipped this without issues. |
As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1846251 gecko-commit: 62534bac923526d52c2d5f377d00bdf2d34b9a05 gecko-reviewers: peterv, devtools-reviewers
…v,devtools-reviewers As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930
…v,devtools-reviewers As per w3c/csswg-drafts#8940. I didn't do this in bug 1837638 because that's what the spec said at the time, that's what other browsers did, and specially because if we did this we had no way of runtime-disable nesting during development or if things went south. This means that we can't keep the nesting pref in 118, but that seems fine (it's already enabled everywhere in 117). Differential Revision: https://phabricator.services.mozilla.com/D184930
https://drafts.csswg.org/css-nesting/#cssom-style has:
Why doing that rather than inheriting from
CSSGroupingRule
, which gives you that?cc @tabatkins @sesse
The text was updated successfully, but these errors were encountered: