Has the ::-Webkit-Selection Selector Ever Been Supported

Has the ::-webkit-selection selector ever been supported?

I’ve tested all the way back to Safari 1.0 (using Multi-Safari), and no version supports ::-webkit-selection (and they all do support ::selection).

Unless this is an issue with Multi-Safari, ::-webkit-selection has never been supported in Safari post-1.0. I guess it might have been in the public beta though.

::selection background-color and color rendering in browsers

According to quirksmode.org, -webkit-selection and -moz-selection are indeed available. I just tested it with Chrome (18) and Firefox (13) and can confirm that it works with Firefox, but I didn't have success with -webkit-selection on Chrome (it ignored it), and according to this SO question it doesn't exist (and the answer says that ::selection should also work on all browser, but doesn't for me, too).

As already metioned in this answer, Chrome forces the selection to be transparent, but you can work around this using

background:rgba(255, 255, 255, 0.99);

For more details, checkout the linked answer by tw16


Furthermore, this works for me on FF:

::selection { /* stuff */ }
::-moz-selection { /* stuff */}

But this does not:

::selection, ::-moz-selection { /* stuff */ }

But maybe this is not related to ::selection but does apply on all pseudo elements, couldn't find an answer to that.

How to get ::selection to work correctly with hyphenation?

I think this is probably a bug. Firefox, which supports hyphenation as well, colors the hyphens correctly.

problem with select and :after with CSS in WebKit

I haven't checked this extensively, but I'm under the impression that this isn't (yet?) possible, due to the way in which select elements are generated by the OS on which the browser runs, rather than the browser itself.

Which browsers support WebKit CSS?

Wikipedia has a summary of what browsers use WebKit as their HTML rendering engine. The WebKit Project itself has even an more complete list.

What property defines the color of text select in css?

You are probably looking for this (note double : is correct):

::selection {color:#fff;background:red;}
::-moz-selection {color:#fff;background:red;}

How can I make use of `::selection` for input in chrome browsers?

I think they started supporting this selector.

::selection selector to give a color for the text inside <input> works fine on Chrome browser now. You can check the same snippet on chrome to test.

Sample Image



Related Topics



Leave a reply



Submit