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

Re: [css3-selectors][css3-ui] Status of the ::selection pseudo-element

From: Lea Verou <leaverou@gmail.com>
Date: Wed, 25 Jan 2012 16:00:49 +0200
Message-ID: <4F200B11.7020400@gmail.com>
To: Lev Solntsev <greli@mail.ru>
CC: www-style@w3.org
On 25/1/12 15:45, Lev Solntsev wrote:
> On Wed, 25 Jan 2012 16:43:13 +0400, Lea Verou <leaverou@gmail.com> wrote:
>> Please correct me if I'm mistaken, but it looks like most of these
>> problems are related with ::selection being a new pseudo-element. How
>> about a new property instead?
>>
>> selection: <color>{1,3} | auto;
>>
>> First color would be background-color, second color would be text
>> color, third color could be text-shadow color.
>> Future versions could introduce more parameters.
>>
>> It would also be kinda on par with the new `caret` property in css4-ui
>> which will also be explored IIRC.
>
> What about text-shadow, text-decoration? While it's common to leave
> text-decoration since it have currentColor, text-shadow is much worse.
>
> When you have white text-shadow on the black text it looks very nice
> until one select the text. But selection of such text is very ugly
> by default on Windows: a white text with white shadow and blue background.
>
> Moreover, one of Webkit bugs is that it stops applying system default
> selection color and background if you just set
> ::selection { text-shadow:none }
> On the other hand, Opera doesn't apply text-shadow to ::selection.
>

My proposal already addressed text-shadow color as the third value.
I don't think text-decoration is needed in sufficient use cases. Do you 
have any examples?


-- 
Lea Verou (http://lea.verou.me | @LeaVerou)
Received on Wednesday, 25 January 2012 14:01:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:49 GMT