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 van Kesteren
Received on Saturday, 23 July 2005 15:05:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:19 UTC