W3C home > Mailing lists > Public > www-validator-css@w3.org > July 2001

[A Bug?] validation and specified media

From: <rob@bluerobot.com>
Date: Fri, 13 Jul 2001 10:47:45 -0700
To: <www-validator-css@w3.org>
Message-ID: <000201c10bc3$ee1a8c10$0201a8c0@RobPC>
     I greatly appreciate the W3C CSS Validator and use it regularly. There
is something about it that has bothered me for a little while now: when
media is suggested in a <style> element, errors are generated for style
rules in that element that do not apply to the specified media. For example,
the following would generate an error like "Property voice-family doesn't
exist for media screen..."

<style type="text/css" media="screen">voice-family:inherit;</style>

With the popularity of the (ugly and brilliant) Tantek IE5/Win parsing hack
<http://www.tantek.com/CSS/Examples/boxmodelhack.html>, this is a very real
issue. For an example of a page using the Tantek hack with "media='screen'"
and generating errors, see <http://bluerobot.com/web/layouts/layout1.html>
and validation results
     My question to you - does specifying media really make inapplicable
style rules invalid? If so, then that caveat should definitely attached to
the promotion of the Tantek hack - I will gladly attempt to spread the word.
However, if the value of the media attribute (as in the example above) is
really only a suggestion and does not affect the validity of a stylesheet,
then errors should not be thrown. In that case, maybe those incidents should
be downgraded to warnings(?).
     I would love to hear you opinion about this issue. I was under the
impression that someone from the Zeldman/Tantek et al. CSS club brought this
to your attention a couple of months ago, but there may have been some
miscommunication. I don't want to assume that the validator still throwing
errors means that it has been decided to be correct. A definitive response
would be much appreciated. Thank you in advance. Take care.
-- Rob Chandanais
Received on Friday, 13 July 2001 11:44:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:00:33 UTC