Last active
August 29, 2015 14:03
-
-
Save cfxd/bbbb73e0051d1204dfa5 to your computer and use it in GitHub Desktop.
LESS Mixin to change selection color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.selection(@color; @bg) { | |
&::selection { | |
-webkit-font-smoothing: antialiased; | |
color: @color; | |
text-shadow: none; | |
background: @bg; | |
background: fadeout(@bg, 1%); | |
} | |
&::-moz-selection { | |
-webkit-font-smoothing: antialiased; | |
color: @color; | |
text-shadow: none; | |
background: @bg; | |
background: fadeout(@bg, 1%); | |
} | |
} | |
//control body select | |
.selection(#fff; #000); | |
//override element | |
.element { | |
.selection(#000; #fff); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment