W3C home > Mailing lists > Public > www-style@w3.org > March 2004

RE: Proposal: useragent at-rule

From: Scott Romack <sromack@PTSTEAMS.com>
Date: Tue, 30 Mar 2004 15:11:41 -0600
Message-ID: <C902C0F80A54A143AEEAB9893B758DB00B307C@RICHARDSONSRV.PTSTEAMS.COM>
To: <www-style@w3.org>

I like that one!
Then lazy elitists like me could wrap that baby around my whole CSS and
sleep easy.


-----Original Message-----
From: L. David Baron [mailto:dbaron@dbaron.org] 
Sent: Tuesday, March 30, 2004 1:40 PM
To: www-style@w3.org
Subject: Re: Proposal: useragent at-rule



On Tuesday 2004-03-30 10:37 -0800, Dave Shea wrote:
> I don't have a magic bullet here; the methods discussed until now all
> have their drawbacks. The mechanism itself is of little consequence to

> me, anyway, provided there *is* a mechanism. And that's what I'm going

> for here: a way to selectively hide style to user agents that can't 
> render it.

A solution that hasn't been brought up in this thread, and that I would
probably prefer to all the ones that have been brought up, is a solution
similar to the problem that has been called "co-dependent properties" in
a number of discussions on this list in the past.  See, e.g., [1] and
[2].

The previous discussions about co-dependent properties were based on the
idea that it should be possible to mark a set of declarations as
co-dependent such that they would either all need to be the winning
declaration in the cascade or they would all be ignored.  This is
probably very difficult to implement, and perhaps also to describe
formally.

A simpler variation that might be useful here is a way of indicating
that the user-agent should ignore an entire block of rules if it does
not support any of the properties or values involved.  This could be
implemented entirely at parse time and would be relatively easy to
implement.  For example:

@if-all-supported {   /* I don't like the name, as usual */
  html { display: table; }
  body { display: table-row; }
  body > * { display: table-cell; }
  body > *:first-child { width: 10em; }
}

-David

[1] http://lists.w3.org/Archives/Public/www-style/1998Nov/0037.html
[2] http://lists.w3.org/Archives/Public/www-style/2003Dec/0172.html
     (especially last paragraph)

-- 
L. David Baron                                <URL: http://dbaron.org/ >
Received on Tuesday, 30 March 2004 16:56:55 GMT

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