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 14:41:10 UTC