variables.less 9.08 KB
Newer Older
Thomas Park's avatar
Thomas Park committed
1
// Spruce 2.3.0
Thomas Park's avatar
Thomas Park committed
2
3
4
// Variables
// --------------------------------------------------

Thomas Park's avatar
Thomas Park committed
5

Thomas Park's avatar
Thomas Park committed
6
// Global values
Thomas Park's avatar
Thomas Park committed
7
8
9
10
// --------------------------------------------------


// Grays
Thomas Park's avatar
Thomas Park committed
11
// -------------------------
Thomas Park's avatar
Thomas Park committed
12
13
14
15
16
17
18
19
@black:                 #000;
@grayDarker:            #222;
@grayDark:              #333;
@gray:                  #555;
@grayLight:             #999;
@grayLighter:           #eee;
@white:                 #fff;

Thomas Park's avatar
Thomas Park committed
20

Thomas Park's avatar
Thomas Park committed
21
// Accent colors
Thomas Park's avatar
Thomas Park committed
22
// -------------------------
23
@blue:                  #004E8B;
Thomas Park's avatar
Thomas Park committed
24
25
26
@blueDark:              #013435;
@green:                 #015B4E;
@red:                   #D14432;
27
28
@yellow:                #F0F1E1;
@orange:                #F26522;
Thomas Park's avatar
Thomas Park committed
29
30
31
@pink:                  #A15B66;
@purple:                #7073CF;

Thomas Park's avatar
Thomas Park committed
32
33
34

// Scaffolding
// -------------------------
35
36
@bodyBackground:        @white;
@textColor:             @gray;
Thomas Park's avatar
Thomas Park committed
37
38
39
40


// Links
// -------------------------
41
42
@linkColor:             lighten(@green, 10%);
@linkColorHover:        @linkColor;
Thomas Park's avatar
Thomas Park committed
43
44


Thomas Park's avatar
Thomas Park committed
45
// Typography
Thomas Park's avatar
Thomas Park committed
46
// -------------------------
47
48
49
50
@sansFontFamily:        "Helvetica Neue", Helvetica, Arial, sans-serif;
@serifFontFamily:       Georgia, "Times New Roman", Times, serif;
@monoFontFamily:        Menlo, Monaco, Consolas, "Courier New", monospace;

51
52
@baseFontSize:          15px;
@baseFontFamily:        @serifFontFamily;
Thomas Park's avatar
Thomas Park committed
53
@baseLineHeight:        21px;
54
@altFontFamily:         @serifFontFamily;
Thomas Park's avatar
Thomas Park committed
55

56
57
58
@headingsFontFamily:    'Crete Round', serif; // empty to use BS default, @baseFontFamily
@headingsFontWeight:    normal;    // instead of browser default, bold
@headingsColor:         @grayDark; // empty to use BS default, @textColor
Thomas Park's avatar
Thomas Park committed
59

Thomas Park's avatar
Thomas Park committed
60
61
62
63
64
65
66
67
68
69
70

// Component sizing
// -------------------------
// Based on 14px font-size and 20px line-height

@fontSizeLarge:         @baseFontSize * 1.25; // ~18px
@fontSizeSmall:         @baseFontSize * 0.85; // ~12px
@fontSizeMini:          @baseFontSize * 0.75; // ~11px

@paddingLarge:          11px 19px; // 44px
@paddingSmall:          2px 10px;  // 26px
Thomas Park's avatar
Thomas Park committed
71
@paddingMini:           0px 6px;   // 22px
Thomas Park's avatar
Thomas Park committed
72
73
74
75
76
77

@baseBorderRadius:      4px;
@borderRadiusLarge:     6px;
@borderRadiusSmall:     3px;


Thomas Park's avatar
Thomas Park committed
78
79
// Tables
// -------------------------
80
81
82
@tableBackground:                   lighten(#ddd, 10%); // overall background-color
@tableBackgroundAccent:             lighten(#ddd, 5%); // for striping
@tableBackgroundHover:              #ddd; // for hover
83
@tableBorder:                       @grayLight; // table and cell border
Thomas Park's avatar
Thomas Park committed
84

Thomas Park's avatar
Thomas Park committed
85
// Buttons
Thomas Park's avatar
Thomas Park committed
86
87
88
// -------------------------
@btnBackground:                     @white;
@btnBackgroundHighlight:            darken(@white, 10%);
89
@btnBorder:                         darken(@white, 15%);
Thomas Park's avatar
Thomas Park committed
90

91
92
@btnPrimaryBackground:              lighten(@green, 5%);
@btnPrimaryBackgroundHighlight:     @green;
Thomas Park's avatar
Thomas Park committed
93

94
@btnInfoBackground:                 lighten(#2f96b4, 5%);
Thomas Park's avatar
Thomas Park committed
95
96
@btnInfoBackgroundHighlight:        #2f96b4;

97
98
@btnSuccessBackground:              lighten(@blue, 10%);
@btnSuccessBackgroundHighlight:     lighten(@blue, 5%);
Thomas Park's avatar
Thomas Park committed
99

100
@btnWarningBackground:              lighten(@orange, 5%);
Thomas Park's avatar
Thomas Park committed
101
102
@btnWarningBackgroundHighlight:     @orange;

103
104
@btnDangerBackground:               lighten(@red, 5%);
@btnDangerBackgroundHighlight:      @red;
Thomas Park's avatar
Thomas Park committed
105

106
107
@btnInverseBackground:              @gray;
@btnInverseBackgroundHighlight:     darken(@gray, 5%);
Thomas Park's avatar
Thomas Park committed
108
109
110
111
112
113


// Forms
// -------------------------
@inputBackground:               @white;
@inputBorder:                   #ccc;
Thomas Park's avatar
Thomas Park committed
114
@inputBorderRadius:             @baseBorderRadius;
Thomas Park's avatar
Thomas Park committed
115
@inputDisabledBackground:       @grayLighter;
116
@formActionsBackground:         transparent;
Thomas Park's avatar
Thomas Park committed
117
118
@inputHeight:                   @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border

Thomas Park's avatar
Thomas Park committed
119
120
121

// Dropdowns
// -------------------------
122
123
@dropdownBackground:            #002425;
@dropdownBorder:                transparent;
Thomas Park's avatar
Thomas Park committed
124
@dropdownDividerTop:            transparent;
125
@dropdownDividerBottom:         @grayLight;
Thomas Park's avatar
Thomas Park committed
126

127
@dropdownLinkColor:             @white;
Thomas Park's avatar
Thomas Park committed
128
@dropdownLinkColorHover:        @white;
129
@dropdownLinkColorActive:       @white;
130

131
132
@dropdownLinkBackgroundActive:  @green;
@dropdownLinkBackgroundHover:   @green;
Thomas Park's avatar
Thomas Park committed
133

Thomas Park's avatar
Thomas Park committed
134
135
136
137
138


// COMPONENT VARIABLES
// --------------------------------------------------

Thomas Park's avatar
Thomas Park committed
139

Thomas Park's avatar
Thomas Park committed
140
// Z-index master list
Thomas Park's avatar
Thomas Park committed
141
// -------------------------
Thomas Park's avatar
Thomas Park committed
142
143
144
145
// Used for a bird's eye view of components dependent on the z-axis
// Try to avoid customizing these :)
@zindexDropdown:          1000;
@zindexPopover:           1010;
Thomas Park's avatar
Thomas Park committed
146
@zindexTooltip:           1030;
Thomas Park's avatar
Thomas Park committed
147
148
149
150
@zindexFixedNavbar:       1030;
@zindexModalBackdrop:     1040;
@zindexModal:             1050;

Thomas Park's avatar
Thomas Park committed
151

Thomas Park's avatar
Thomas Park committed
152
// Sprite icons path
Thomas Park's avatar
Thomas Park committed
153
// -------------------------
Thomas Park's avatar
Thomas Park committed
154
155
156
@iconSpritePath:          "../img/glyphicons-halflings.png";
@iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";

Thomas Park's avatar
Thomas Park committed
157

Thomas Park's avatar
Thomas Park committed
158
// Input placeholder text color
Thomas Park's avatar
Thomas Park committed
159
// -------------------------
Thomas Park's avatar
Thomas Park committed
160
@placeholderText:         #ccc;
Thomas Park's avatar
Thomas Park committed
161

Thomas Park's avatar
Thomas Park committed
162
163

// Hr border color
Thomas Park's avatar
Thomas Park committed
164
// -------------------------
165
@hrBorder:                @grayLight;
Thomas Park's avatar
Thomas Park committed
166

Thomas Park's avatar
Thomas Park committed
167

168
169
170
171
172
// Horizontal forms & lists
// -------------------------
@horizontalComponentOffset:       180px;


Thomas Park's avatar
Thomas Park committed
173
174
// Wells
// -------------------------
175
@wellBackground:                  #ddd;
Thomas Park's avatar
Thomas Park committed
176
177


Thomas Park's avatar
Thomas Park committed
178
// Navbar
Thomas Park's avatar
Thomas Park committed
179
// -------------------------
Thomas Park's avatar
Thomas Park committed
180
@navbarCollapseWidth:             979px;
Thomas Park's avatar
Thomas Park committed
181
@navbarCollapseDesktopWidth:      @navbarCollapseWidth + 1;
Thomas Park's avatar
Thomas Park committed
182

183
@navbarHeight:                    55px;
Thomas Park's avatar
Thomas Park committed
184
@navbarBackgroundHighlight:       @navbarBackground;
185
@navbarBackground:                @blueDark;
Thomas Park's avatar
Thomas Park committed
186
@navbarBorder:                    darken(@navbarBackground, 5%);
Thomas Park's avatar
Thomas Park committed
187
188

@navbarText:                      @grayLight;
189
190
191
192
193
@navbarLinkColor:                 @white;
@navbarLinkColorHover:            @white;
@navbarLinkColorActive:           @white;
@navbarLinkBackgroundHover:       #002425;
@navbarLinkBackgroundActive:      @navbarLinkBackgroundHover;
Thomas Park's avatar
Thomas Park committed
194

195
@navbarBrandColor:                @navbarLinkColor;
Thomas Park's avatar
Thomas Park committed
196
197
198
199
200
201

// Inverted navbar
@navbarInverseBackground:                @wellBackground;
@navbarInverseBackgroundHighlight:       lighten(@wellBackground, 5%);
@navbarInverseBorder:                    darken(@navbarInverseBackground, 5%);

202
@navbarInverseText:                      @textColor;
Thomas Park's avatar
Thomas Park committed
203
@navbarInverseLinkColor:                 @headingsColor;
204
205
206
207
@navbarInverseLinkColorHover:            @navbarInverseLinkColor;
@navbarInverseLinkColorActive:           @navbarInverseLinkColor;
@navbarInverseLinkBackgroundHover:       darken(@navbarInverseBackground, 7%);
@navbarInverseLinkBackgroundActive:      @navbarInverseLinkBackgroundHover;
Thomas Park's avatar
Thomas Park committed
208
209
210
211

@navbarInverseSearchBackground:          lighten(@navbarInverseBackground, 25%);
@navbarInverseSearchBackgroundFocus:     @white;
@navbarInverseSearchBorder:              @navbarInverseBackground;
212
@navbarInverseSearchPlaceholderColor:    @gray;
Thomas Park's avatar
Thomas Park committed
213
214
215
216
217
218

@navbarInverseBrandColor:                @navbarInverseLinkColor;


// Pagination
// -------------------------
219
@paginationBackground:                darken(@bodyBackground, 10%);
Thomas Park's avatar
Thomas Park committed
220
221
@paginationBorder:                    transparent;
@paginationActiveBackground:          #A2CDB5;
Thomas Park's avatar
Thomas Park committed
222
223
224
225


// Hero unit
// -------------------------
226
@heroUnitBackground:              #ddd;
Thomas Park's avatar
Thomas Park committed
227
@heroUnitHeadingColor:            @headingsColor;
Thomas Park's avatar
Thomas Park committed
228
229
@heroUnitLeadColor:               inherit;

Thomas Park's avatar
Thomas Park committed
230
231

// Form states and alerts
Thomas Park's avatar
Thomas Park committed
232
// -------------------------
Thomas Park's avatar
Thomas Park committed
233
234
@warningText:             @white;
@warningBackground:       @orange;
Thomas Park's avatar
Thomas Park committed
235
236
@warningBorder:           darken(spin(@warningBackground, -10), 3%);

Thomas Park's avatar
Thomas Park committed
237
238
@errorText:               @white;
@errorBackground:         @red;
Thomas Park's avatar
Thomas Park committed
239
240
@errorBorder:             darken(spin(@errorBackground, -10), 3%);

Thomas Park's avatar
Thomas Park committed
241
242
@successText:             @white;
@successBackground:       #24C00B;
Thomas Park's avatar
Thomas Park committed
243
244
@successBorder:           darken(spin(@successBackground, -10), 5%);

Thomas Park's avatar
Thomas Park committed
245
246
@infoText:                @white;
@infoBackground:          #185AF9;
Thomas Park's avatar
Thomas Park committed
247
248
249
@infoBorder:              darken(spin(@infoBackground, -10), 7%);


Thomas Park's avatar
Thomas Park committed
250
251
252
253
254
255
256
257
258
259
// Tooltips and popovers
// -------------------------
@tooltipColor:            #fff;
@tooltipBackground:       #000;
@tooltipArrowWidth:       5px;
@tooltipArrowColor:       @tooltipBackground;

@popoverBackground:       #fff;
@popoverArrowWidth:       10px;
@popoverArrowColor:       #fff;
260
@popoverTitleBackground:  @green;
Thomas Park's avatar
Thomas Park committed
261
262
263
264
265
266

// Special enhancement for popovers
@popoverArrowOuterWidth:  @popoverArrowWidth + 1;
@popoverArrowOuterColor:  rgba(0,0,0,.25);


Thomas Park's avatar
Thomas Park committed
267
268
269
270

// GRID
// --------------------------------------------------

Thomas Park's avatar
Thomas Park committed
271

Thomas Park's avatar
Thomas Park committed
272
// Default 940px grid
Thomas Park's avatar
Thomas Park committed
273
// -------------------------
Thomas Park's avatar
Thomas Park committed
274
275
276
277
278
@gridColumns:             12;
@gridColumnWidth:         60px;
@gridGutterWidth:         20px;
@gridRowWidth:            (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));

Thomas Park's avatar
Thomas Park committed
279
280
281
282
283
284
285
286
287
288
289
// 1200px min
@gridColumnWidth1200:     70px;
@gridGutterWidth1200:     30px;
@gridRowWidth1200:        (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));

// 768px-979px
@gridColumnWidth768:      42px;
@gridGutterWidth768:      20px;
@gridRowWidth768:         (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));


Thomas Park's avatar
Thomas Park committed
290
// Fluid grid
Thomas Park's avatar
Thomas Park committed
291
// -------------------------
Thomas Park's avatar
Thomas Park committed
292
293
294
295
296
297
298
299
300
301
@fluidGridColumnWidth:    percentage(@gridColumnWidth/@gridRowWidth);
@fluidGridGutterWidth:    percentage(@gridGutterWidth/@gridRowWidth);

// 1200px min
@fluidGridColumnWidth1200:     percentage(@gridColumnWidth1200/@gridRowWidth1200);
@fluidGridGutterWidth1200:     percentage(@gridGutterWidth1200/@gridRowWidth1200);

// 768px-979px
@fluidGridColumnWidth768:      percentage(@gridColumnWidth768/@gridRowWidth768);
@fluidGridGutterWidth768:      percentage(@gridGutterWidth768/@gridRowWidth768);