twitter/bootstrap — Issue #1288: Allow easier modification of alerts colors
Author: Anahkiasen
Created: 2012-01-27 10:25:18+00:00
State: open

In the variables.less file we have the following type of presentation :

@errorText: #b94a48; // hsl(0, 60, 75)
@errorBackground: #f2dede; // hsl(0, 10, 95)
@errorBorder: #e9c7c7; // hsl(0, 15, 90)

Now it may be a small add, but I think it would be better, flexibility-wise, to do a better use of the LESS color functions to something like this :

@errorColor: #b94a48; // hsl(0, 60, 75)
@errorText: darken(@error, 20)
@errorBackground: desaturate(@errorText, 50);
@errorBorder: darken(@errorText, 10);

Don't take into account those values, I put it to make an example, but making better use of variables and color functions in general make it easier afterwards to modify something in general. Here if I want to modify the whole color of the error panel I just change @errorColor.