twitter/bootstrap — Issue #1826: Variable for selection color
Author: Anahkiasen
Created: 2012-02-08 10:04:49+00:00
State: open

Bootstrap already let you customize a lot of things on your project, I was thinking : why not let the user customize selection color ?
The best way I think is via a short mixin :

.selection(@color)
{
&::selection { background: @color }
&::-moz-selection { background: @color }
}

That allows you to do, per example, `#corps { .selection(red) }` which would set the selection color to red for the #corps div only.
You can even pre-add a general selection color that would be customizable with a variable and therefore, customizable via the, well, customize page.