[A Bug?] validation and specified media

Hello.
     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
<http://jigsaw.w3.org/css-validator/validator?uri=http://bluerobot.com/web/l
ayouts/layout1.html>
     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
http://bluerobot.com/

Received on Friday, 13 July 2001 11:44:54 UTC