Comments on Media Queries 20020123 [resend]

I note that the comments on Media Queries that I submitted on 20th 
February 2002 do not appear in the archive. They were 
copied to (Members only) list, where they do appear in 
the archive for that date. I attach the original message for the record.

Roger Gimson
HP Laboratories, Filton Road, Stoke Gifford, Bristol BS34 8QZ, ENGLAND   Tel: +44 117-312-8167  Fax: +44 117-312-8925

Forwarded message 1

  • From: Roger Gimson <>
  • Date: Wed, 20 Feb 2002 14:31:16 +0000
  • Subject: Comments on Media Queries 20020123
  • To:
  • CC:
  • Message-ID: <>
I attach my comments on the Last Call Working Draft of Media Queries 
20020123. They have been reviewed by the W3C Device Independence Working 
Group, who have raised no objection to my sending them on their behalf. 
I apologise for them being sent so close to the deadline.

Roger Gimson
HP Laboratories, Filton Road, Stoke Gifford, Bristol BS34 8QZ, ENGLAND   Tel: +44 117-312-8167  Fax: +44 117-312-8925


Comments on Media Queries Working Draft 23 January 2002.

The Media Queries document, now at its last call working draft, proposes
how some delivery context attributes can be accessed within CSS
stylesheets or other markup that uses the 'media' attribute. It expands
the handling of media types already present in HTML4 and CSS2.

The approach proposed is constrained by the need for backward
compatibility with HTML and CSS, which dictates the syntactic structures
that can be used.

First, I have some specific comments that relate to the definitions and
proposals made in the document.

(Comment-1) The document assumes the 'media types' used in CSS2, which
were derived from the 'media descriptors' of HTML4: aural, braille,
handheld, print, projection, screen, tty, tv, embossed. These types,
which in some cases refer to device categories rather than the media
they support, have never been very well defined, and are likely to be
inadequate for authoring in the future. In particular, it seems to be
assumed that the media types are mutually exclusive, in that any
particular device can only support one media type. If they are mutually
exclusive, this will be a problem for multimodal devices (see Comment-3
for an example). Furthermore, it is likely that distinctions between
device types will become more blurred in the future (e.g. watching tv on
a handheld). It would be better to encourage authors to select styles
according to device capabilities that are important to their application
rather than broad categories of device. At some stage, the media types
should either be deprecated, or be redefined in terms of assumed device
capabilities (e.g. 'screen' implies an interactive visual presentation
of a given minimum height and width, 'print' implies a paged, static
visual presentation of a given minimum resolution).

(Comment-2) In Section 4 which defines Media Queries, the following
statement is made: "If a media feature does not apply to the device
where the UA is running, expressions involving the media feature will be
false". Does 'device' mean 'media type', as used in the following
example of an 'aural device'? (See also Comment-4)

(Comment-3) In the example, the expression "aural and (min-device-width:
800px)" is said to be always false. However, this need not be false for
a multimodal device that supports both aural and visual presentations.

(Comment-4) Maybe I am used to a different pseudo-BNF notation, but it
seems that the ? and * are the wrong way round. I expect ? to mean
none-or-one and * to mean none-or-many.

(Comment-5) In the list of media features in Section 6, features are
described as being applied to the following 'media types': visual,
tactile, aural, bitmapped, tv. Three of these are not valid 'media
types' as defined in Section 1, but rather 'media groups' as defined in
the CSS2 Specification, section 7.3.1 (although 'bitmap' is used there
rather than 'bitmapped'). In fact, media groups are much closer to
capturing orthogonal device capabilities than media types, and since
they are already the basis for defining which CSS properties may be
applicable, would also form a sounder basis for media queries in

(Comment-6) The examples used in Section 6 are all specific to CSS since
they start with "@media". Previous examples showed media queries in the
context of media attributes within xlink elements. Presumably the
media_query syntax is defined to allow the same syntax to be used in
either situation. The reason for the switch in example style should be

To respond to the points raised in Comments 1,3,5, here is a specific

(Proposal) Allow media queries to additionally test which media groups
(there may be more than one) the target device supports, and to
interpret media types (for backward compatibility) as combinations of
media groups as defined in the CSS2 Specification. For example, the
following would be possible media queries:
    "paged and (min-resolution: 300dpi)"
    "aural and visual"

This proposal also has the merit that more checking could be performed
at authoring time by the authoring tools. In particular, a
media-group(s)-specific style rule is only valid if it is used to set
properties relevant to that media group(s). For example, the following
could be flagged as an error by an authoring tool:
    @media continuous { H1 { page-break-before: always } }

Finally, the proposed syntax of Media Queries (with min- and max-
prefixes) is designed to avoid writing expressions (particularly ones
that use > and < symbols). This is a neat avoidance tactic, but I am
glad that room has been left for further extension to the syntax. In the
future, it is quite possible that authors will wish to make more
specific queries of the delivery context that will require the use of
general expressions with comparison operators.


Received on Wednesday, 13 March 2002 10:15:38 UTC