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

DI working group: Comments on Media Queries 20020123

From: Bert Bos <bert@w3.org>
Date: Fri, 22 Feb 2002 17:36:49 +0100
Message-ID: <15478.29601.964145.566773@jfouffa.inria.fr>
To: www-style@w3.org
This message was sent to the list, but somehow didn't show up:


> Message-ID: <3C73B334.6010209@hpl.hp.com>
> Date: Wed, 20 Feb 2002 14:31:16 +0000
> From: Roger Gimson <roger_gimson@hplb.hpl.hp.com>
> To: www-style@w3.org
> Subject: Comments on Media Queries 20020123
> 
> 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
> roger_gimson@hpl.hp.com   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
> stylesheets.
> 
> (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
> explained.
> 
> To respond to the points raised in Comments 1,3,5, here is a specific
> proposal.
> 
> (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:
>     "interactive"
>     "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.


-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Friday, 22 February 2002 11:36:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:13 GMT