W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: [css3-mediaqueries] Is (width) ever false?

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 18 Jun 2008 15:37:59 -0700
To: www-style@w3.org
Message-ID: <20080618223759.GA12580@pickering.dbaron.org>

On Wednesday 2008-06-18 15:04 -0700, L. David Baron wrote:
> http://dev.w3.org/csswg/css3-mediaqueries/#media1 says:
>   # For a media feature feature, (feature) will evaluate to true if
>   # (feature:x) will evaluate to true for a value x other than zero.
> Does this mean:
>   (a) (width) is always true, even if the viewport width is zero,
>   because "0px" is a value other than zero, or:
>   (b) (width) is false when the viewport width is zero because "0px"
>   and "0" are both not "other than zero"?
> I'd also note that because specified widths cannot be negative,
> (max-width) currently behaves the same as (width), whereas
> (min-width) is always true.  Is that really intended?

I'd also note that part of this is a change from the CR.  In
particular, the requirement that (min-width) and (max-width) are
different from (width) is new.  It introduces extra complexity
because it requires propagating the knowledge of which media
features allow zero values (currently all that accept min/max other
than the <ratio> features) and which accept negative values into the
matching code, rather than just enforcing that as a parse-time

Should valueless media feature expressions with min- and max- even
be allowed?  I'm not sure they make sense.  If they are allowed, the
CR's wording where they are treated the same as without min-/max-
seems easier to implement for something that I don't see a good use


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Wednesday, 18 June 2008 22:38:34 UTC

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