This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22479 - "disabled flag" should look at media/alternate/etc
Summary: "disabled flag" should look at media/alternate/etc
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-26 15:11 UTC by Simon Pieters
Modified: 2016-03-30 13:23 UTC (History)
3 users (show)

See Also:


Attachments

Comment 1 Simon Pieters 2013-08-27 14:37:32 UTC
Seems like the disabled flag gets set for alternate stylesheets in Gecko/Presto, but in WebKit/Blink the style sheet is not added at all and the disabled flag says false.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2495

For media attribute, Gecko/Presto/WebKit/Blink add the style sheet and let .disabled be false.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2496

What does IE do?
Comment 2 Boris Zbarsky 2013-08-27 15:28:39 UTC
What does Webkit/Blink do when the alternate stylesheet set is switched to?
Comment 3 Simon Pieters 2013-08-27 20:35:16 UTC
I can't seem to find a way to switch stylesheet sets in WebKit/Blink, either by UI or with JS...
Comment 4 Boris Zbarsky 2013-08-27 20:39:50 UTC
Well, the question is what the behavior should be in a UA that _does_ allow such switching and how it should impact the CSSOM.

Clearly if you never allow switching to alternate sheets, not loading them at all becomes a feasible optimization... ;)
Comment 5 Simon Pieters 2013-08-27 21:20:23 UTC
We discussed this a bit in #whatwg and pondered about the idea of dropping alternative stylesheets altogether.

[[
# [22:14] <annevk> zcorpan: that API is kinda hopeless, nobody is really interested  
# [22:14] <Hixie_> yeah, alternative style sheets in general have rather failed  
# [22:14] <zcorpan> maybe we should drop it  
# [22:15] <Hixie_> as much as it would pain me to agree, yeah  
# [22:15] <annevk> There's a lot of potential simplicity gain there  
# [22:15] <Hixie_> yeah  
# [22:15] <Hixie_> should see if mozilla would drop it  
# [22:15] <Hixie_> i think it's very sad that we'd remove it, but it is a lot of complexity for something that virtually nobody uses  
]]
http://krijnhoetmer.nl/irc-logs/whatwg/20130827
Comment 6 Simon Pieters 2013-09-12 15:38:44 UTC
Rune has improved the situation in Blink somewhat (that happened before the idea of dropping alternative stylesheets came up), e.g. now alternative stylesheets are added to document.styleSheets.

For now I think I won't drop alternative stylesheets but specify the API assuming that it is supported. The specific APIs that only Gecko supports can be marked at risk until they are implemented in some other engine.
Comment 7 Simon Pieters 2016-03-30 13:23:44 UTC
https://github.com/w3c/csswg-drafts/commit/e5353d078e686136fdb28c7de37ffd375cd6d79f removed the API for alternative stylesheets.