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:26:17 -0800
Message-Id: <D7CC31B0-7D1E-45DE-B5E2-E36C91027339@gmail.com>
Cc: Arron Eicholz <Arron.Eicholz@microsoft.com>, Sylvain Galineau <sylvaing@microsoft.com>, Mounir Lamouri <mounir@lamouri.fr>, www-style list <www-style@w3.org>, "Lea Verou (leaverou@gmail.com)" <leaverou@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Jan 24, 2013, at 11:51 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Thu, Jan 24, 2013 at 11:42 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> On Jan 24, 2013, at 10:32 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>> Arguments from theoretical purity are interesting and all, but that's
>>> the lowest level in the hierarchy of constituents.  The most important
>>> thing is to figure out what kind of styling would produce the desired
>>> effect for placeholder text, and then we reason backwards from there
>>> to figure out what kind of properties and/or selectors we need to
>>> achieve that effect in the best manner.
>> I disagree. Its not just a matter of purity. If there is an easy-to-understand way to describe the desired effect without a logically surprising distortion of what we already defined as the difference between pseudo-element and pseudo-class, then that should be the clear winner over something unjustifiably assumes a cross-UA internal structure of a form element in order to twist it into something that 'opacity' works well with. Especially when said twisting also reduces styling choices for the form element (styling borders based on the placeholder state), and when doing it another way increases styling opportunities in other situations (changing a color's alpha in any element without simultaneously having to set the other color components).
>> If we need to define how something that is clearly a pseudo-class works in order to allow better author styling, then we shouldn't limit ourselves to not creating new properties or color values to do it.
> Given that I'm arguing specifically *for* creating new properties (or
> rather, pulling in SVG-specific properties to general CSS), I think
> your argument is misplaced. ^_^
> I'm arguing against Arron and Sylvain's assertions that we should
> decide, from a theoretical perspective, whether to address placeholder
> styling with a pseudoclass or pseudo-element, and then after making
> that decision, decide on the styling.
> Theoretical purity arguments certainly have a place, but they're just
> much less important than other concerns.  We should feel free to bring
> them up as support for an option that has other good reasons for
> existing, but it shouldn't be used as an early filter to rule out
> potential solutions.

I'm just saying that what you are calling theoretical purity is more than that. It is fundamental to an understanding of what makes something a pseudo-class and not a pseudo-element, and we should be very, very reticent to confuse the issue. I don't think that is less important than the "other concerns" in this case. It is a stretch to pretend that a text input has a certain internal structure, just because it is a convenient way to apply an existing property to describe the text color. I am not saying you shouldn't bring it up, as it did lead to ideas for other solutions, but then we should rule it out because it does not fit well with the model of how we define pseudos. 
Received on Thursday, 24 January 2013 20:26:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:25 UTC