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

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 UTC