W3C home > Mailing lists > Public > site-comments@w3.org > January 2011

Re: Advanced style sheet still applied in mobile view in Chrome and Safari

From: Ian Jacobs <ij@w3.org>
Date: Tue, 11 Jan 2011 22:55:05 -0600
Cc: Francois Daoust <fd@w3.org>, site-comments@w3.org
Message-Id: <F76589B8-F783-4FA1-9BF1-505D39E1DF44@w3.org>
To: Ian Jacobs <ij@w3.org>
Hello François,

I believe we fixed the issue you indicated below. Thanks for the report!

  _ Ian


On 16 Dec 2010, at 12:15 PM, Ian Jacobs wrote:

>
> On 16 Dec 2010, at 7:42 AM, Francois Daoust wrote:
>
>> Hi,
>>
>> Among other things, switching to mobile view on a "desktop" Web  
>> browser disables the "advanced" stylesheet through a tiny bit of  
>> JavaScript code that sets the "disabled" attribute on the  
>> appropriate <style> element.
>>
>> There is a bug in WebKit that affects Safari and Google Chrome. The  
>> "disabled" attribute is not (always) taken into account when set:
>> https://bugs.webkit.org/show_bug.cgi?id=25287
>>
>> In short, switching to mobile view with Safari and Google Chrome  
>> only switches some of the styles (styles that rely on the presence  
>> of a "w3c_screen" class name on the <body> element get correctly  
>> deactivated, those that rely on the presence of a "w3c_handheld"  
>> class name get correctly activated), but some styles from the  
>> advanced style sheet still get applied, in particular for event  
>> dates, leading to a weird layout (dates overflow the visual date  
>> background in that case).
>>
>> From a standard perspective, I note that the "disabled" attribute  
>> on the <style> element is being standardized within HTML5 and CSSOM  
>> but was not defined in HTML4 / XHTML 1.0, AFAICT:
>> http://dev.w3.org/html5/spec/semantics.html#the-style-element
>> http://dev.w3.org/csswg/cssom/#dom-stylesheet-disabled
>>
>> I suppose a possible workaround would be to remove the <style>  
>> element altogether while switching to mobile view (it could be kept  
>> in memory and re-inserted in the DOM if the user decides to switch  
>> back to desktop view).
>
>
>
> Hi François,
>
> Thanks for the detailed report. We'll have a look at the issue.
>
> _ Ian
> --
> Ian Jacobs (ij@w3.org)    http://www.w3.org/People/Jacobs/
> Tel:                                      +1 718 260 9447
>
>

--
Ian Jacobs (ij@w3.org)    http://www.w3.org/People/Jacobs/
Tel:                                      +1 718 260 9447
Received on Wednesday, 12 January 2011 04:55:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 24 October 2012 16:21:33 GMT