Re: Pseudo-Classes :button and :input

On 9/16/09 4:58 PM, Tobias Herp wrote:
>> Every browser except IE is, to my knowledge either doing it a different
>> way or planning to do it a different way.
>
> Will these different ways solve the formatting issue? How?

Probably not.  Since the file input will be changing to allow selecting 
more than one file in many cases, it's not at all clear how they'll look 
to start with; it will likely differ in different browsers.

> Yes. But you can't rely exclusively on attribute selectors currently anyway since IE doesn't support them

It doesn't support your new proposal either.

> The effort of /one/ additional selector is rewarded with nicely formatted file upload controls.

As I keep saying I don't expect Firefox to allow web pages to style the 
insides of file upload controls.

> What do you consider more likely: That IE supports attribute selectors (which seems to be difficult and wouldn't solve the file input issue anyway), or that two little additional pseudo-classes (all major graphical browsers know about pseudo-classes, and almost all format buttons) are supported?

I have no idea.  Why not ask the IE team?

I know for every single other browser attribute selectors are a heck 
more likely to be supported.

>> It wouldn't be hard to implement.  The question is whether it's worth
>> implementing and adding to the web platform in general.
>
> Since it solves a very common problem, I do think it's worth it.

The problem already has a solution for buttons, though.  As I said, for 
text controls there's a much stronger reason for this.

>> Not really; Gecko would still not allow the styling of internal parts of
>> a file input, for example.
>
> Why?  "It wouldn't be hard to implement".

Because we don't think it's in our users' best interests.  It would be 
trivial to implement: I'd just remove the extra code that currently 
prevents it.  But there's a reason we have that code.

>> Since<input type="text">  and<textarea>  already have different padding,
>> vertical alignment, margins, etc in browsers by default, it's not that
>> obvious to me, actually.
>
> Well, input fields are inline elements, textareas are blocks

Not at all.  They're both replaced inlines from the CSS point of view 
(more or less; they do have useful baselines in some browsers, etc).  I 
suggest testing this with the following markup:

   data:text/html,Some text<textarea></textarea>Some text

Sure doesn't behave like a block!

> but when e.g. changing the background color for :focus, I'd treat them just the same.

Sure.  I understand the use cases....

What about the 15 other types of form controls in HTML5?

> It is simple (while sometimes cumbersome, since input[type="submit"] input[type="button"] and button are to be considered) for all buttons *but* those in input[type="file"].

Which UAs don't want to allow styling in any case.  At least Gecko doesn't.

>>> I know about the attribute selectors; but they just *don't work* for
>>> the file type input elements.
>>
>> Neither will this; see above.
>
> ???
> (Sorry, I can't follow you here)

I would strongly oppose allowing web pages to select and style parts of 
file inputs in Gecko.  Not sure how to be more clear about it....

-Boris

Received on Thursday, 17 September 2009 00:08:34 UTC