-
Notifications
You must be signed in to change notification settings - Fork 717
[css-conditional-3] Setting .conditionText interop is terrible #6819
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
I think this should be consistent with |
Being able to update the condition for a rule is somewhat useful for tools today, as you can use it to toggle entire blocks of rules easily by just setting the condition to something that's always-true or always-false. Ultimately we want to solve this use-case better with custom MQs, but given that setting the conditionText does work in at least some places today, I think it's reasonable to preserve that if possible. |
The CSS Working Group just discussed
The full IRC log of that discussion<emilio> topic: conditionText setter interop<emilio> github: https://github.com//issues/6819 <emilio> fantasai: there's a lot of failures when I was testing this. Firefox was the most correct on @media but fails on @supports. WebKit / Blink doesn't support either <emilio> ... do we want to file impl bugs or call them readonly? <emilio> q+ <emilio> TabAtkins: I know setting media attributes on link is useful <emilio> ... and used by some tooling <emilio> ... so I think it's useful to continue supporting it <emilio> ... but I wouldn't shed too many tears if we call it readonly <fantasai> emilio: I'd like to say that making conditionalText in the OM is different from what tooling does changing medi aof link <fantasai> emilio: latter depends on ... stylesheets <fantasai> TabAtkins: I was talking about toggling an @media rule <fantasai> emilio: But not supported by WebKit and Blink <fantasai> TabAtkins: Toggling *conditionText* isn't supported. But toggling mediaText *is*, though essentially a synonym <fantasai> emilio: The media attribute on link or style element toggles the DOM attribute <fantasai> TabAtkins: not talking about that <fantasai> TabAtkins: talking about @media rule <fantasai> emilio: ah, ok, that's weird <fantasai> TabAtkins: Jonathan Neal has exploited that to toggle entire sets of rules before <fantasai> Rossen_: So if we move to resolve on making this readonly <fantasai> Rossen_: would there be any objections to it? <fantasai> fantasai: I suspect in either case we need changes in implementations <fantasai> fantasai: just a question of which way we want to go <oriol> q+ <emilio> ack emilio <Rossen_> q? <fantasai> Rossen_: Forcing a normative change here would be encouraging something to change <emilio> ScribeNick: emilio <fantasai> fantasai: I have a PR adding tests, just haven't merged because opened this issue <oriol> Reconnecting headset <emilio> ack oriol <emilio> oriol: conditionText seems analogous to selectorText for style rules and that's not read-only <emilio> ... in the past it was not interoperable but it got fixed <fantasai> emilio: Counter-example, we made layerName readonly <fantasai> emilio: and generally leaning towards making OM readonly <emilio> ... so counter-examples in both directions which is not a great state of affairs <emilio> Rossen: So options are leave as-is and hoping tests cause browsers to change <emilio> ... or resolve on making read-only <emilio> ... should we do a straw-poll? <emilio> TabAtkins: I'd prefer to make stuff consistently mutable <bradk> +1 As is, but encourage browsers to change <fantasai> s/mutable/mutable, given this is analogous to existing htings which are mutable/ <TabAtkins> emilio: Making @supports mutable would be a change <TabAtkins> emilio: @media dynamically changes but @supports doesn't currently <smfr> q+ <futhark> Existing issue for Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=1210073 <emilio> emilio: so that might be why Firefox doesn't support mutating it. In general readonly is going to be easier to get interop on <emilio> ... but not super-strong feelings either way <emilio> ack bradk <emilio> bradk: I think it should be mutable <emilio> ack smfr <emilio> smfr: from an implementor perspective we'd like to CSSOM be more readonly, we don't have many incentives to fix these bugs <TabAtkins> I suppose the fact that @media *does* have the .media mutable means it's okay for the .conditionText to be a readonly version that covers everyone <bradk> A <fantasai> 0 <emilio> strawpol: A - as-is, B - read-only <oriol> A <florian> 0 <emilio> B <smfr> B <TabAtkins> B <futhark> B <miriam> 0 <dholbert> 0 <jensimmons> B <astearns> 0 <jfkthame> 0 <bradk> I don’t feel super strongly about it <lea> Α <delan> 0 <TYLin> A <Morgan> 0 <rachelandrew> B <tantek> B until there's a use-case described (didn't see it) <Rossen_> B <castastrophe> A <chris> 0 <lea> Reasoning: Readonly puts undue burden on authors when they need to modify these rules to make things easier for implementors <emilio> RESOLVED: Make conditionText readonly |
https://bugs.webkit.org/show_bug.cgi?id=237880 Reviewed by Antoine Quint. LayoutTests/imported/w3c: * web-platform-tests/interfaces/css-conditional.idl: Source/WebCore: Per CSSWG resolution w3c/csswg-drafts#6819 (comment) This also matches Blink. * css/CSSConditionRule.h: * css/CSSConditionRule.idl: * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::setConditionText): Deleted. * css/CSSMediaRule.h: * css/CSSSupportsRule.cpp: (WebCore::CSSSupportsRule::setConditionText): Deleted. * css/CSSSupportsRule.h: Canonical link: https://commits.webkit.org/248425@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=237880 Reviewed by Antoine Quint. LayoutTests/imported/w3c: * web-platform-tests/interfaces/css-conditional.idl: Source/WebCore: Per CSSWG resolution w3c/csswg-drafts#6819 (comment) This also matches Blink. * css/CSSConditionRule.h: * css/CSSConditionRule.idl: * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::setConditionText): Deleted. * css/CSSMediaRule.h: * css/CSSSupportsRule.cpp: (WebCore::CSSSupportsRule::setConditionText): Deleted. * css/CSSSupportsRule.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@291286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed by 6c659d6 |
I think the following sentence should be removed in 7.3. The CSSMediaRule interface:
|
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307 UltraBlame original commit: 7f7bd8cbdf5afcaa74f452b011dc64002e4e4e7d
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307 UltraBlame original commit: 7f7bd8cbdf5afcaa74f452b011dc64002e4e4e7d
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307 UltraBlame original commit: 7f7bd8cbdf5afcaa74f452b011dc64002e4e4e7d
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
…adonly, a=testonly Automatic update from web-platform-tests Make CSSConditionRule's conditionText readonly As per w3c/csswg-drafts#6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT. -- wpt-commits: 9801c63eb65b11f7e584f8031c80723e6f1413b7 wpt-pr: 43307
Uh oh!
There was an error while loading. Please reload this page.
The CSS Conditional Rules spec specifies that
conditionText
can be set, and if it is grammatical, updates the condition applied to the CSSConditionRule to which it applies.So far, Firefox mostly supports this correctly on CSSMediaRules, and mostly fails on CSSSupportsRule; and neither Blink nor WebKit seem to support setting conditionText at all. See testcase Do we want to file bugs, or redefine conditionText as readonly?
The text was updated successfully, but these errors were encountered: