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

RE: Feedback on Media Queries CR

From: Håkon Wium Lie <howcome@opera.com>
Date: Thu, 18 Jul 2002 23:53:06 +0200
Message-ID: <15671.14530.510000.897683@gargle.gargle.HOWL>
To: <Art.Barstow@nokia.com>
Cc: <tantekc@microsoft.com>, <glazman@netscape.com>, <www-style@w3.org>

Also sprach Art.Barstow@nokia.com:

 > > I think there is room for both a client-based and a server-based
 > > solution. 
 > If you would please send me the pointer(s) to the WG's detailed 
 > end-to-end use cases for Media Queries then we can discuss your
 > assertion.  For example, how does the agent that creates a Media
 > Queries (e.g. author, tool) know the target device's capabilities;
 > or is the idea a Media Queries is created statically (not on demand)?  

Yes, the latter will be the most common usage, I believe.

 > It's reasonable for the spec to be silent on this but I'm trying 
 > to understand the real world usage(s) the WG envisions.

And it's reasonable for you to ask the question. I'll try to sketch a
few common use cases.

1) When W3C staff give presentations, they use a tool to split a large
HTML document into smaller ones based on the structure of the
document. The smaller files each point to a style sheet. Or, rather,
each file points to three different style sheets. One is called
"640x480", the other is "800x600", the third is "1024x768" (or
something). The presenter then has to manually select the proper style
sheet for the screen resolution in use. With media queries, this can
now be handled automatically.

(The "problem" could have been solved by other means as well: the
browser could support zooming of some kind, or a new length unit
relative to the size of the viewport could have been introduced.)

2) The introduction of mobile web devices with smaller screens poses a
presentation problem. The two-dimensional table-based layout of a
common web page does not scale well onto a smaller screen. Using Media
Queries, the style sheet can use a table-based layout on a large
screen, and a block-based layout on a small screen. The content will
be the same, but a few lines in the style sheet will be different, and
the right one will automatically be selected.

3) Mail-order catalogs have color fidelity concerns on the web. E.g.,
customers will complain if the garments they order online turn out
in "different" colors. Media queries will make it possible to show a
warning message if the color capabilities of the device is too low to
show colors of acceptable fidelity. (But LCDs will still be poor.)

4) One way to classify video signals is the scan method: progressive
or interlaced. On interlaced screens one should not use thin (1px)
horizontal lines since they will flicker. Borders around boxes should
therefore be 2px or more on interlaced devices, and this can be
expressed in Media Queries.

I don't think the Media Queries specification (MQ) addresses all
presentation problems, and it doesn't solve any one problem fully.
However, it gives authors a way to express presentation preferences
that are beyond CSS and well into JavaScript-land. Using JavaScript
and proprietary interfaces, much of the MQ functionality can be
achieved. So, if MQ appears hostile, JS is the target.

              Håkon Wium Lie                          cto °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Thursday, 18 July 2002 17:59:05 UTC

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