W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Re: Tabbed Interfaces in CSS

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 24 Apr 2009 20:45:21 -0700
Cc: www-style list <www-style@w3.org>
Message-Id: <E951A7B7-D936-4919-8034-E49BF1EB0079@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

On Apr 24, 2009, at 6:21 PM, Boris Zbarsky wrote:

> Brad Kemper wrote:
>> Ah, so that's what it is. And I can't seem to override it with my  
>> own '!important' declarations either, even if I put it in a 'style'  
>> attribute, so that does seem like a bug in Firefox.
>
> Use of !important rules in a UA sheet is a vendor-specific extension

It is? I thought !important was well defined for use within any style  
sheet.

> (the spec never talks about !important rules in UA sheets),

It doesn't talk about which has precedence, in the way that it does  
for author use of !important vs. user use of !important (user  
overrides author, in a reversal of normal precedence). So lacking any  
such exception, one would expect that normal precedence applies, in  
which the rules in earlier loading style sheets (such as the UA style  
sheet) can be overridden by later loading rules with the same or  
greater specificity. And that just as one !important can override an  
earlier one in the same style sheet, that it could also override one  
in an earlier loading style sheet.

I've never seen anything that makes the !important declarations in UA  
style sheets more powerful than the ones in any other style sheet.

> but it makes sense for them to override all other !important rules.  
> I mean... the same thing could have been put in C++ code with the  
> same effect; the use of a vendor extension in a UA stylesheet is an  
> implementation detail.

But its not in C++ code; its in a style sheet, and should therefore  
follow the normal rules of how style sheets work.

If it was a vendor extension, it should have -moz- in front of it,  
shouldn't it?

> If the real claim is that the particular rendering of <legend> is a  
> bug,

No, its not.

> I'd like to see the spec that says so.  Note that the default  
> rendering required of <legend> for web compat cannot be described  
> via CSS at the moment,

How so? Because it has a background that is transparent to everything  
except the border of the fieldset? That's actually one of the things  
that I COULD change. The properties that could NOT be changed not only  
COULD be described by CSS, but apparently ARE described by CSS in the  
UA style sheet (width, position, etc.).

> so <legend> doesn't really participate in the CSS box model.

I don't know why not. It can be simulated pretty well with a  
absolutely positioned span inside a relative position div  with a  
little padding on the top. That doesn't seem that exotic.

> The extent to which UAs paper over this fact in various ways varies,  
> but the CSS spec doesn't specify anything over those papering-over  
> attempts.

Maybe it should.

> This is the same issue as various other things in form-control land,  
> like the innards of <select> and so forth.

Innards of select cannot always be described or restyled via CSS, but  
some things, like positioning and width, often can be, and often are.  
And the innards of, say, a file upload input, are not represented in  
the HTML as a separate element the way LEGEND is. What is so  
complicated about a simple little box with text in it? The fact that  
'legend' can't in Firefox but can in other UAs absolutely smells like  
a bug to me.
Received on Saturday, 25 April 2009 03:46:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:46:58 GMT