Re: Styling <input type=text>

Op 30-9-2015 om 19:56 schreef Tab Atkins Jr.:
> On Wed, Sep 30, 2015 at 7:06 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
>> For the user agent stylesheet, there's no good way to address <input
>> type=text>, since there's many values that make the <input> element
>> end up in the Text state.
>>
>> [...]
> [...]
>
> That said, if we did want to tackle it, the right way would be with an
> :input-type() pseudoclass.  Then :input-type(text) would match
> <input>, <input type=text>, and <input type=foo>.

Just a thought that has occurred to me:

Why not tackle this problem in a broader sense and come up with a 
mechanism to address certain displays types that are emergent, so to 
speak...

Consider, for example:

<ins><p>Something</p></ins> and <p><ins>Something</ins> else</p>

In the first case INS is a block-lever element, but in the second case 
it's expected to be inline-level. Addressing things like this properly 
can get quite complex at times.

A selector for display types could address both these examples, and a 
myriad of other cases. Something like this:

ins:display('block')
and
input:display('textarea')

Of course, it would allow you to do something silly like this:

ins:display('block') { display: inline; }

...but I don't think that this would break it. However, I might be 
missing something else entirely. Again, just a thought.

Received on Wednesday, 30 September 2015 20:45:53 UTC