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 5913 - STYLE_SHEET_USE-4 is only applied to "CSS Style"
Summary: STYLE_SHEET_USE-4 is only applied to "CSS Style"
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-30 10:05 UTC by fd
Modified: 2008-07-30 13:22 UTC (History)
3 users (show)

See Also:


Attachments

Description fd 2008-07-30 10:05:53 UTC
I apologize since I'm the one that raised the comment that triggered the change. In my long report email:
http://lists.w3.org/Archives/Public/public-mobileok-checker/2008Jul/0056.html

I wrote:
[[
StyleSheetsUse: STYLE_SHEETS_USE-4 is applied on style elements 
restricted to a media type different from "handheld" or "all" via the 
media attribute.
   see test STYLE_SHEETS_USE 10
   In short, the following (stupid) code should not trigger any WARN 
IMO, because the style is already restricted via the media attribute:
    <style type="text/css" media="tv">@media tv { body { color: red; } 
}</style>
]]

Well, the spec says:
[[
If all styles are restricted to presentation media types other than "handheld" or "all" by means of @media  at-rules, warn
]]

"all styles" is different from "CSS Style", and "all" styles should thus be taken into account. There is a slight inconsistency because the end of the sentence should rather be, IMO: "by means of @media at-rules or by use of the media attribute", but the spirit of the test here is to warn when there are styles defined and no style that actually matches the "all" or "handheld" media type.

In short, as opposed to my previous comment:
 <style type="text/css" media="tv">@media tv { body { color: red; } 
}</style>
... should trigger a warn, IMO (if it's the only style element defined in the page, that is), and:
 <style type="text/css" media="tv">body { color: red; }</style>
... should trigger a warn as well, btw.

I'll assign the bug to myself and fix the test accordingly, unless I hear some vehement protests.
Comment 1 fd 2008-07-30 13:22:21 UTC
I updated the StyleSheetsUseTest stylesheet accordingly.

Note that we lost the ability to precise the position in the embedded CSS style, since we apply STYLE_SHEETS_USE-4 globally, merging all embedded CSS styles together.

I updated STYLE_SHEETS_USE tests of the test suite accordingly.