[css-nesting] Why does CSSStyleRule not inherit from CSSGroupingRule? · Issue #8940 · w3c/csswg-drafts (original) (raw)
Comments
https://drafts.csswg.org/css-nesting/#cssom-style has:
partial interface CSSStyleRule { [SameObject] readonly attribute CSSRuleList cssRules; unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0); undefined deleteRule(unsigned long index); };
Why doing that rather than inheriting from CSSGroupingRule
, which gives you that?
cc @tabatkins @sesse
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 [css-nesting] Why does CSSStyleRule not inherit from CSSGroupingRule?
, and agreed to the following:
RESOLVED: Change CSSStyleRule to inherit from CSSGroupingRule, modulo any discovered compat impact
The full IRC log of that discussion emilio: Nesting spec extends CSSSTyleRule by copypasting CSSGroupingRule API
emilio: Think there was a point in the past we discussed enhancing CSSSTyleRule but discarded that
emilio: So maybe instead we could have CSSStyleRule inherit from CSSGroupingRule? Then enhancements from either come to both.
emilio: Would make it more likely that changes (like using observablearray) would apply to both
emilio: This is all assuming there's no compat impact.
emilio: Assuming that, I think this is the right thing to do.
No objections from me, modulo possible compat impact we'll find.
(it would be *relatively* hard to have a compat impact here, I imagine)
astearns: Objections?
RESOLVED: Change CSSStyleRule to inherit from CSSGroupingRule, modulo any discovered compat impact
emilio: I'd also expect compat to be rare
emilio: Few people use instanceof, they use duck-typing
emilio: And we shipped .cssRules on CSSStyleRule without issue
tabatkins added a commit that referenced this issue
…gRule, so remove the now extraneous definitions from Nesting.
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue
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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue
…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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue
…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
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue
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
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue
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
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue
…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
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue
…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
This has tests now, and spec text, so closing.
FWIW Gecko shipped this without issues.
Lightning00Blade pushed a commit to Lightning00Blade/wpt that referenced this issue
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
Loirooriol pushed a commit to Loirooriol/stylo that referenced this issue
…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
Loirooriol pushed a commit to Loirooriol/stylo that referenced this issue
…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