Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the height of selection highlight

Is there a way to change the height of the text selection highlight without changing the line-height of the element that contains it?

Thanks.

like image 831
asenovm Avatar asked Dec 18 '12 10:12

asenovm


1 Answers

If you what to do this with CSS only the the answer is NO.

Only a small subset of CSS properties can be used in a rule using ::selection in its selector: color, background, background-color and text-shadow. Note that, in particular, background-image is ignored, like any other property. https://developer.mozilla.org/en-US/docs/CSS/::selection

like image 182
Nikita Avatar answered Sep 22 '22 02:09

Nikita