W3C home > Mailing lists > Public > www-style@w3.org > January 2013

Re: Styling HTML placeholder attribute

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 24 Jan 2013 12:08:41 -0800
Message-Id: <EBE06A74-22E4-4772-A265-4FAF52859AB7@gmail.com>
Cc: Lea Verou <lea@w3.org>, Sylvain Galineau <sylvaing@microsoft.com>, Mounir Lamouri <mounir@lamouri.fr>, www-style list <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Jan 24, 2013, at 10:00 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Wed, Jan 23, 2013 at 9:40 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> On Jan 23, 2013, at 5:12 PM, Lea Verou <lea@w3.org> wrote:
>> 
>>> The main issue with that is that if authors don't style it but they do style input, the UA stylesheet can't override that with input:not(:completed), similarly to how a UA¡¯s a:hover won't override the author¡¯s a. But a :placeholder pseudo-class has the same issue. I wonder how browsers implementing placeholders with a pseudo-class have solved this. Are they violating the cascade or am I missing something?
>> 
>> A UA stylesheet with an 'a:hover' rule defined should override what the author has for the same property in an 'a' rule, because 'a:hover' has more specificity.
> 
> No, it's in a weaker origin, so it loses to the author rule before
> specificity is even checked.

OK, I am mistaken then. I didn't realize the matching was at the element level only. I had assumed somehow that step 1 of the cascading order was to find all declarations that matched the element **in its current state** and the property in question, but I see now that this isn't the case. Sorry for the noise. 
Received on Thursday, 24 January 2013 20:09:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT