UI for CSS Media Queries and value-less features

Currently implementing CSS Media Queries in my editor, BlueGriffon,
I would like to make a comment on a feature of Media Queries that is
a bit painful to implement in a simple and intuitive UI.

Media Queries allow the specification of value-less features like

   screen and (color)

In that case, the spec says the (color) media feature is true if
(color: x) is true for a non-zero value of x. In other terms, it
is similar to (min-color: 1).

So to provide a user with a UI setting the 'color' media feature,
you have to have at least one control to set a positive integer
value (textbox, slider, whatever) AND a way to say 'this media feature
is value-less'. And that is not easy if you want to avoid geekery.
It's also not easy to preserve some unity between the controls to
set 'color' and 'min-color'. The former allows a value-less feature,
the latter does not...

Furthermore, a value-less feature is useless in most cases: width,
height, device-width, device-height, aspect-ratio, device-aspect-ratio,
orientation, scan. It's in fact only usable - and useful - for color,
color-index, monochrome and grid. Please note the value of these
features is an integer, so the minimal non-zero value is always 1.

All in all, this gives me the feeling the value-less media features
are a spec feature that is good to have from a strict browser point
of view but (a) is redundant with min-xxx (b) did not consider
"editability", if you allow me this neologism...

I would recommend:

1. discuss if value-less media features are really needed and if
    the 'min-xxxxx: 1' features are not enough

2. for each feature in the spec, add a descriptor to say if the feature
    is allowed without value, just as we already say if it accepts
     min- and max- prefixes.

</Daniel>

Received on Tuesday, 9 November 2010 09:22:02 UTC