W3C home > Mailing lists > Public > www-style@w3.org > July 2005

[css3-mediaqueries] 6.2. width - negative <length> allowed?

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Sat, 23 Jul 2005 17:04:59 +0200
Message-ID: <20050723170459.y4fba20jyxickso4@webmail.annevankesteren.nl>
To: howcome@opera.com
Cc: www-style@w3.org

I was wondering why a negative <length> for 'width' (and other media features)
is not disallowed. Having the following simple (technically incorrect testcase)
shows hopefully what I mean:

# <html xmlns="http://www.w3.org/1999/xhtml">
#  <style type="text/css">
#   p{ background:red }
#   @media all and (min-width:-100px){ p { background:red  } }
#  </style>
#  <p>This line should have a green background.</p>
# </html>

I hope a further revision of the specification could say that "<length> must be
a positive integer when applied to a media feature specified in this
specification." (Perhaps adding "or zero" to that for clarity if needed.)

Kind regards,

Anne


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
Received on Saturday, 23 July 2005 15:05:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:39 GMT