Mercurial > wikked
annotate static/bootstrap/less/mixins.less @ 158:e53a3b64dfd8
Renamed main Wikked script.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 09 Jan 2014 20:59:41 -0800 |
parents | d29e2f337b00 |
children |
rev | line source |
---|---|
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 // |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 // Mixins |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 // -------------------------------------------------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
4 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
5 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
6 // Utilities |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
7 // ------------------------- |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
8 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 // Clearfix |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
10 // Source: http://nicolasgallagher.com/micro-clearfix-hack/ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
11 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
12 // For modern browsers |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
13 // 1. The space content is one way to avoid an Opera bug when the |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
14 // contenteditable attribute is included anywhere else in the document. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
15 // Otherwise it causes space to appear at the top and bottom of elements |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
16 // that are clearfixed. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
17 // 2. The use of `table` rather than `block` is only necessary if using |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
18 // `:before` to contain the top-margins of child elements. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
19 .clearfix() { |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
20 &:before, |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
21 &:after { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
22 content: " "; // 1 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
23 display: table; // 2 |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
24 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
25 &:after { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
26 clear: both; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
27 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
28 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
29 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
30 // WebKit-style focus |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
31 .tab-focus() { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
32 // Default |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
33 outline: thin dotted; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
34 // WebKit |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
35 outline: 5px auto -webkit-focus-ring-color; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
36 outline-offset: -2px; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
37 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
38 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
39 // Center-align a block level element |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
40 .center-block() { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
41 display: block; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
42 margin-left: auto; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
43 margin-right: auto; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
44 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
45 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
46 // Sizing shortcuts |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
47 .size(@width; @height) { |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
48 width: @width; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
49 height: @height; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
50 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
51 .square(@size) { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
52 .size(@size; @size); |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
53 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
54 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
55 // Placeholder text |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
56 .placeholder(@color: @input-color-placeholder) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
57 &:-moz-placeholder { color: @color; } // Firefox 4-18 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
58 &::-moz-placeholder { color: @color; // Firefox 19+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
59 opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
60 &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
61 &::-webkit-input-placeholder { color: @color; } // Safari and Chrome |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
62 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
63 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
64 // Text overflow |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
65 // Requires inline-block or block for proper styling |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
66 .text-overflow() { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
67 overflow: hidden; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
68 text-overflow: ellipsis; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
69 white-space: nowrap; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
70 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
71 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
72 // CSS image replacement |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
73 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
74 // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
75 // mixins being reused as classes with the same name, this doesn't hold up. As |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
76 // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
77 // that we cannot chain the mixins together in Less, so they are repeated. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
78 // |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
79 // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
80 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
81 // Deprecated as of v3.0.1 (will be removed in v4) |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
82 .hide-text() { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
83 font: ~"0/0" a; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
84 color: transparent; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
85 text-shadow: none; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
86 background-color: transparent; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
87 border: 0; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
88 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
89 // New mixin to use as of v3.0.1 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
90 .text-hide() { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
91 .hide-text(); |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
92 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
93 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
94 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
95 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
96 // CSS3 PROPERTIES |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
97 // -------------------------------------------------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
98 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
99 // Single side border-radius |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
100 .border-top-radius(@radius) { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
101 border-top-right-radius: @radius; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
102 border-top-left-radius: @radius; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
103 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
104 .border-right-radius(@radius) { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
105 border-bottom-right-radius: @radius; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
106 border-top-right-radius: @radius; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
107 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
108 .border-bottom-radius(@radius) { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
109 border-bottom-right-radius: @radius; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
110 border-bottom-left-radius: @radius; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
111 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
112 .border-left-radius(@radius) { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
113 border-bottom-left-radius: @radius; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
114 border-top-left-radius: @radius; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
115 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
116 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
117 // Drop shadows |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
118 .box-shadow(@shadow) { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
119 -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1 |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
120 box-shadow: @shadow; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
121 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
122 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
123 // Transitions |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
124 .transition(@transition) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
125 -webkit-transition: @transition; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
126 transition: @transition; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
127 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
128 .transition-property(@transition-property) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
129 -webkit-transition-property: @transition-property; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
130 transition-property: @transition-property; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
131 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
132 .transition-delay(@transition-delay) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
133 -webkit-transition-delay: @transition-delay; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
134 transition-delay: @transition-delay; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
135 } |
88 | 136 .transition-duration(@transition-duration) { |
137 -webkit-transition-duration: @transition-duration; | |
138 transition-duration: @transition-duration; | |
139 } | |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
140 .transition-transform(@transition) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
141 -webkit-transition: -webkit-transform @transition; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
142 -moz-transition: -moz-transform @transition; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
143 -o-transition: -o-transform @transition; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
144 transition: transform @transition; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
145 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
146 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
147 // Transformations |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
148 .rotate(@degrees) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
149 -webkit-transform: rotate(@degrees); |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
150 -ms-transform: rotate(@degrees); // IE9+ |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
151 transform: rotate(@degrees); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
152 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
153 .scale(@ratio) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
154 -webkit-transform: scale(@ratio); |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
155 -ms-transform: scale(@ratio); // IE9+ |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
156 transform: scale(@ratio); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
157 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
158 .translate(@x; @y) { |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
159 -webkit-transform: translate(@x, @y); |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
160 -ms-transform: translate(@x, @y); // IE9+ |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
161 transform: translate(@x, @y); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
162 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
163 .skew(@x; @y) { |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
164 -webkit-transform: skew(@x, @y); |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
165 -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+ |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
166 transform: skew(@x, @y); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
167 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
168 .translate3d(@x; @y; @z) { |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
169 -webkit-transform: translate3d(@x, @y, @z); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
170 transform: translate3d(@x, @y, @z); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
171 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
172 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
173 .rotateX(@degrees) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
174 -webkit-transform: rotateX(@degrees); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
175 -ms-transform: rotateX(@degrees); // IE9+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
176 transform: rotateX(@degrees); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
177 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
178 .rotateY(@degrees) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
179 -webkit-transform: rotateY(@degrees); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
180 -ms-transform: rotateY(@degrees); // IE9+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
181 transform: rotateY(@degrees); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
182 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
183 .perspective(@perspective) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
184 -webkit-perspective: @perspective; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
185 -moz-perspective: @perspective; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
186 perspective: @perspective; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
187 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
188 .perspective-origin(@perspective) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
189 -webkit-perspective-origin: @perspective; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
190 -moz-perspective-origin: @perspective; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
191 perspective-origin: @perspective; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
192 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
193 .transform-origin(@origin) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
194 -webkit-transform-origin: @origin; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
195 -moz-transform-origin: @origin; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
196 transform-origin: @origin; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
197 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
198 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
199 // Animations |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
200 .animation(@animation) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
201 -webkit-animation: @animation; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
202 animation: @animation; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
203 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
204 |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
205 // Backface visibility |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
206 // Prevent browsers from flickering when using CSS 3D transforms. |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
207 // Default value is `visible`, but can be changed to `hidden` |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
208 .backface-visibility(@visibility){ |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
209 -webkit-backface-visibility: @visibility; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
210 -moz-backface-visibility: @visibility; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
211 backface-visibility: @visibility; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
212 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
213 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
214 // Box sizing |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
215 .box-sizing(@boxmodel) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
216 -webkit-box-sizing: @boxmodel; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
217 -moz-box-sizing: @boxmodel; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
218 box-sizing: @boxmodel; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
219 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
220 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
221 // User select |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
222 // For selecting text on the page |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
223 .user-select(@select) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
224 -webkit-user-select: @select; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
225 -moz-user-select: @select; |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
226 -ms-user-select: @select; // IE10+ |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
227 -o-user-select: @select; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
228 user-select: @select; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
229 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
230 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
231 // Resize anything |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
232 .resizable(@direction) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
233 resize: @direction; // Options: horizontal, vertical, both |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
234 overflow: auto; // Safari fix |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
235 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
236 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
237 // CSS3 Content Columns |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
238 .content-columns(@column-count; @column-gap: @grid-gutter-width) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
239 -webkit-column-count: @column-count; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
240 -moz-column-count: @column-count; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
241 column-count: @column-count; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
242 -webkit-column-gap: @column-gap; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
243 -moz-column-gap: @column-gap; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
244 column-gap: @column-gap; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
245 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
246 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
247 // Optional hyphenation |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
248 .hyphens(@mode: auto) { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
249 word-wrap: break-word; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
250 -webkit-hyphens: @mode; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
251 -moz-hyphens: @mode; |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
252 -ms-hyphens: @mode; // IE10+ |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
253 -o-hyphens: @mode; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
254 hyphens: @mode; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
255 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
256 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
257 // Opacity |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
258 .opacity(@opacity) { |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
259 opacity: @opacity; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
260 // IE8 filter |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
261 @opacity-ie: (@opacity * 100); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
262 filter: ~"alpha(opacity=@{opacity-ie})"; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
263 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
264 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
265 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
266 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
267 // GRADIENTS |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
268 // -------------------------------------------------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
269 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
270 #gradient { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
271 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
272 // Horizontal gradient, from left to right |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
273 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
274 // Creates two color stops, start and end, by specifying a color and position for each color stop. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
275 // Color stops are not available in IE9 and below. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
276 .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
277 background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
278 background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
279 background-repeat: repeat-x; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
280 filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
281 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
282 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
283 // Vertical gradient, from top to bottom |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
284 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
285 // Creates two color stops, start and end, by specifying a color and position for each color stop. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
286 // Color stops are not available in IE9 and below. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
287 .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
288 background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
289 background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
290 background-repeat: repeat-x; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
291 filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
292 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
293 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
294 .directional(@start-color: #555; @end-color: #333; @deg: 45deg) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
295 background-repeat: repeat-x; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
296 background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
297 background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
298 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
299 .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
300 background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
301 background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
302 background-repeat: no-repeat; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
303 filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
304 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
305 .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
306 background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
307 background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
308 background-repeat: no-repeat; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
309 filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
310 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
311 .radial(@inner-color: #555; @outer-color: #333) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
312 background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
313 background-image: radial-gradient(circle, @inner-color, @outer-color); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
314 background-repeat: no-repeat; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
315 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
316 .striped(@color: rgba(255,255,255,.15); @angle: 45deg) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
317 background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
318 background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
319 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
320 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
321 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
322 // Reset filters for IE |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
323 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
324 // When you need to remove a gradient background, do not forget to use this to reset |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
325 // the IE filter for IE9 and below. |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
326 .reset-filter() { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
327 filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
328 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
329 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
330 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
331 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
332 // Retina images |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
333 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
334 // Short retina mixin for setting background-image and -size |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
335 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
336 .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
337 background-image: url("@{file-1x}"); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
338 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
339 @media |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
340 only screen and (-webkit-min-device-pixel-ratio: 2), |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
341 only screen and ( min--moz-device-pixel-ratio: 2), |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
342 only screen and ( -o-min-device-pixel-ratio: 2/1), |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
343 only screen and ( min-device-pixel-ratio: 2), |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
344 only screen and ( min-resolution: 192dpi), |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
345 only screen and ( min-resolution: 2dppx) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
346 background-image: url("@{file-2x}"); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
347 background-size: @width-1x @height-1x; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
348 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
349 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
350 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
351 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
352 // Responsive image |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
353 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
354 // Keep images from scaling beyond the width of their parents. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
355 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
356 .img-responsive(@display: block;) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
357 display: @display; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
358 max-width: 100%; // Part 1: Set a maximum relative to the parent |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
359 height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
360 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
361 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
362 |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
363 // COMPONENT MIXINS |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
364 // -------------------------------------------------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
365 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
366 // Horizontal dividers |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
367 // ------------------------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
368 // Dividers (basically an hr) within dropdowns and nav lists |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
369 .nav-divider(@color: #e5e5e5) { |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
370 height: 1px; |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
371 margin: ((@line-height-computed / 2) - 1) 0; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
372 overflow: hidden; |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
373 background-color: @color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
374 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
375 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
376 // Panels |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
377 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
378 .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
379 border-color: @border; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
380 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
381 & > .panel-heading { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
382 color: @heading-text-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
383 background-color: @heading-bg-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
384 border-color: @heading-border; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
385 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
386 + .panel-collapse .panel-body { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
387 border-top-color: @border; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
388 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
389 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
390 & > .panel-footer { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
391 + .panel-collapse .panel-body { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
392 border-bottom-color: @border; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
393 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
394 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
395 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
396 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
397 // Alerts |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
398 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
399 .alert-variant(@background; @border; @text-color) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
400 background-color: @background; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
401 border-color: @border; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
402 color: @text-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
403 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
404 hr { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
405 border-top-color: darken(@border, 5%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
406 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
407 .alert-link { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
408 color: darken(@text-color, 10%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
409 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
410 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
411 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
412 // Tables |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
413 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
414 .table-row-variant(@state; @background) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
415 // Exact selectors below required to override `.table-striped` and prevent |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
416 // inheritance to nested tables. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
417 .table { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
418 > thead, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
419 > tbody, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
420 > tfoot { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
421 > tr > .@{state}, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
422 > .@{state} > td, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
423 > .@{state} > th { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
424 background-color: @background; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
425 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
426 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
427 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
428 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
429 // Hover states for `.table-hover` |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
430 // Note: this is not available for cells or rows within `thead` or `tfoot`. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
431 .table-hover > tbody { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
432 > tr > .@{state}:hover, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
433 > .@{state}:hover > td, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
434 > .@{state}:hover > th { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
435 background-color: darken(@background, 5%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
436 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
437 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
438 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
439 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
440 // Button variants |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
441 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
442 // Easily pump out default styles, as well as :hover, :focus, :active, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
443 // and disabled options for all buttons |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
444 .button-variant(@color; @background; @border) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
445 color: @color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
446 background-color: @background; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
447 border-color: @border; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
448 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
449 &:hover, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
450 &:focus, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
451 &:active, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
452 &.active, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
453 .open .dropdown-toggle& { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
454 color: @color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
455 background-color: darken(@background, 8%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
456 border-color: darken(@border, 12%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
457 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
458 &:active, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
459 &.active, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
460 .open .dropdown-toggle& { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
461 background-image: none; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
462 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
463 &.disabled, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
464 &[disabled], |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
465 fieldset[disabled] & { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
466 &, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
467 &:hover, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
468 &:focus, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
469 &:active, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
470 &.active { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
471 background-color: @background; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
472 border-color: @border; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
473 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
474 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
475 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
476 .badge { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
477 color: @background; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
478 background-color: #fff; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
479 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
480 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
481 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
482 // Button sizes |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
483 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
484 .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
485 padding: @padding-vertical @padding-horizontal; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
486 font-size: @font-size; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
487 line-height: @line-height; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
488 border-radius: @border-radius; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
489 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
490 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
491 // Pagination |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
492 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
493 .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
494 > li { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
495 > a, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
496 > span { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
497 padding: @padding-vertical @padding-horizontal; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
498 font-size: @font-size; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
499 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
500 &:first-child { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
501 > a, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
502 > span { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
503 .border-left-radius(@border-radius); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
504 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
505 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
506 &:last-child { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
507 > a, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
508 > span { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
509 .border-right-radius(@border-radius); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
510 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
511 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
512 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
513 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
514 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
515 // Labels |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
516 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
517 .label-variant(@color) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
518 background-color: @color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
519 &[href] { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
520 &:hover, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
521 &:focus { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
522 background-color: darken(@color, 10%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
523 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
524 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
525 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
526 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
527 // Navbar vertical align |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
528 // ------------------------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
529 // Vertically center elements in the navbar. |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
530 // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
531 .navbar-vertical-align(@element-height) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
532 margin-top: ((@navbar-height - @element-height) / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
533 margin-bottom: ((@navbar-height - @element-height) / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
534 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
535 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
536 // Progress bars |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
537 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
538 .progress-bar-variant(@color) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
539 background-color: @color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
540 .progress-striped & { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
541 #gradient > .striped(); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
542 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
543 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
544 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
545 // Responsive utilities |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
546 // ------------------------- |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
547 // More easily include all the states for responsive-utilities.less. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
548 .responsive-visibility() { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
549 display: block !important; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
550 table& { display: table; } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
551 tr& { display: table-row !important; } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
552 th&, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
553 td& { display: table-cell !important; } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
554 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
555 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
556 .responsive-invisibility() { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
557 &, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
558 tr&, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
559 th&, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
560 td& { display: none !important; } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
561 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
562 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
563 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
564 // Grid System |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
565 // ----------- |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
566 |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
567 // Centered container element |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
568 .container-fixed() { |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
569 margin-right: auto; |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
570 margin-left: auto; |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
571 padding-left: (@grid-gutter-width / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
572 padding-right: (@grid-gutter-width / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
573 .clearfix(); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
574 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
575 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
576 // Creates a wrapper for a series of columns |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
577 .make-row(@gutter: @grid-gutter-width) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
578 margin-left: (@gutter / -2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
579 margin-right: (@gutter / -2); |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
580 .clearfix(); |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
581 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
582 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
583 // Generate the extra small columns |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
584 .make-xs-column(@columns; @gutter: @grid-gutter-width) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
585 position: relative; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
586 float: left; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
587 width: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
588 // Prevent columns from collapsing when empty |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
589 min-height: 1px; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
590 // Inner gutter via padding |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
591 padding-left: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
592 padding-right: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
593 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
594 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
595 // Generate the small columns |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
596 .make-sm-column(@columns; @gutter: @grid-gutter-width) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
597 position: relative; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
598 // Prevent columns from collapsing when empty |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
599 min-height: 1px; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
600 // Inner gutter via padding |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
601 padding-left: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
602 padding-right: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
603 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
604 // Calculate width based on number of columns available |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
605 @media (min-width: @screen-sm-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
606 float: left; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
607 width: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
608 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
609 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
610 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
611 // Generate the small column offsets |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
612 .make-sm-column-offset(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
613 @media (min-width: @screen-sm-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
614 margin-left: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
615 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
616 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
617 .make-sm-column-push(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
618 @media (min-width: @screen-sm-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
619 left: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
620 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
621 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
622 .make-sm-column-pull(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
623 @media (min-width: @screen-sm-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
624 right: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
625 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
626 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
627 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
628 // Generate the medium columns |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
629 .make-md-column(@columns; @gutter: @grid-gutter-width) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
630 position: relative; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
631 // Prevent columns from collapsing when empty |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
632 min-height: 1px; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
633 // Inner gutter via padding |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
634 padding-left: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
635 padding-right: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
636 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
637 // Calculate width based on number of columns available |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
638 @media (min-width: @screen-md-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
639 float: left; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
640 width: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
641 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
642 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
643 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
644 // Generate the medium column offsets |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
645 .make-md-column-offset(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
646 @media (min-width: @screen-md-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
647 margin-left: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
648 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
649 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
650 .make-md-column-push(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
651 @media (min-width: @screen-md) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
652 left: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
653 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
654 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
655 .make-md-column-pull(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
656 @media (min-width: @screen-md-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
657 right: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
658 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
659 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
660 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
661 // Generate the large columns |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
662 .make-lg-column(@columns; @gutter: @grid-gutter-width) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
663 position: relative; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
664 // Prevent columns from collapsing when empty |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
665 min-height: 1px; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
666 // Inner gutter via padding |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
667 padding-left: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
668 padding-right: (@gutter / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
669 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
670 // Calculate width based on number of columns available |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
671 @media (min-width: @screen-lg-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
672 float: left; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
673 width: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
674 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
675 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
676 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
677 // Generate the large column offsets |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
678 .make-lg-column-offset(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
679 @media (min-width: @screen-lg-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
680 margin-left: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
681 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
682 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
683 .make-lg-column-push(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
684 @media (min-width: @screen-lg-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
685 left: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
686 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
687 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
688 .make-lg-column-pull(@columns) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
689 @media (min-width: @screen-lg-min) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
690 right: percentage((@columns / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
691 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
692 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
693 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
694 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
695 // Framework grid generation |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
696 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
697 // Used only by Bootstrap to generate the correct number of grid classes given |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
698 // any value of `@grid-columns`. |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
699 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
700 .make-grid-columns() { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
701 // Common styles for all sizes of grid columns, widths 1-12 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
702 .col(@index) when (@index = 1) { // initial |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
703 @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
704 .col(@index + 1, @item); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
705 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
706 .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
707 @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
708 .col(@index + 1, ~"@{list}, @{item}"); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
709 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
710 .col(@index, @list) when (@index > @grid-columns) { // terminal |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
711 @{list} { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
712 position: relative; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
713 // Prevent columns from collapsing when empty |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
714 min-height: 1px; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
715 // Inner gutter via padding |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
716 padding-left: (@grid-gutter-width / 2); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
717 padding-right: (@grid-gutter-width / 2); |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
718 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
719 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
720 .col(1); // kickstart it |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
721 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
722 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
723 .make-grid-columns-float(@class) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
724 .col(@index) when (@index = 1) { // initial |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
725 @item: ~".col-@{class}-@{index}"; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
726 .col(@index + 1, @item); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
727 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
728 .col(@index, @list) when (@index =< @grid-columns) { // general |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
729 @item: ~".col-@{class}-@{index}"; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
730 .col(@index + 1, ~"@{list}, @{item}"); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
731 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
732 .col(@index, @list) when (@index > @grid-columns) { // terminal |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
733 @{list} { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
734 float: left; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
735 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
736 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
737 .col(1); // kickstart it |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
738 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
739 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
740 .calc-grid(@index, @class, @type) when (@type = width) and (@index > 0) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
741 .col-@{class}-@{index} { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
742 width: percentage((@index / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
743 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
744 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
745 .calc-grid(@index, @class, @type) when (@type = push) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
746 .col-@{class}-push-@{index} { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
747 left: percentage((@index / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
748 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
749 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
750 .calc-grid(@index, @class, @type) when (@type = pull) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
751 .col-@{class}-pull-@{index} { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
752 right: percentage((@index / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
753 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
754 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
755 .calc-grid(@index, @class, @type) when (@type = offset) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
756 .col-@{class}-offset-@{index} { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
757 margin-left: percentage((@index / @grid-columns)); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
758 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
759 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
760 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
761 // Basic looping in LESS |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
762 .make-grid(@index, @class, @type) when (@index >= 0) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
763 .calc-grid(@index, @class, @type); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
764 // next iteration |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
765 .make-grid(@index - 1, @class, @type); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
766 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
767 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
768 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
769 // Form validation states |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
770 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
771 // Used in forms.less to generate the form validation CSS for warnings, errors, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
772 // and successes. |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
773 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
774 .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
775 // Color the label and help text |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
776 .help-block, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
777 .control-label, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
778 .radio, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
779 .checkbox, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
780 .radio-inline, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
781 .checkbox-inline { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
782 color: @text-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
783 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
784 // Set the border and box shadow on specific inputs to match |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
785 .form-control { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
786 border-color: @border-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
787 .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
788 &:focus { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
789 border-color: darken(@border-color, 10%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
790 @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
791 .box-shadow(@shadow); |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
792 } |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
793 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
794 // Set validation states also for addons |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
795 .input-group-addon { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
796 color: @text-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
797 border-color: @border-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
798 background-color: @background-color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
799 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
800 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
801 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
802 // Form control focus state |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
803 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
804 // Generate a customized focus state and for any input with the specified color, |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
805 // which defaults to the `@input-focus-border` variable. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
806 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
807 // We highly encourage you to not customize the default value, but instead use |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
808 // this to tweak colors on an as-needed basis. This aesthetic change is based on |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
809 // WebKit's default styles, but applicable to a wider range of browsers. Its |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
810 // usability and accessibility should be taken into account with any change. |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
811 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
812 // Example usage: change the default blue border and shadow to white for better |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
813 // contrast against a dark gray background. |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
814 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
815 .form-control-focus(@color: @input-border-focus) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
816 @color-rgba: rgba(red(@color), green(@color), blue(@color), .6); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
817 &:focus { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
818 border-color: @color; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
819 outline: 0; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
820 .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
821 } |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
822 } |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
823 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
824 // Form control sizing |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
825 // |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
826 // Relative text size, padding, and border-radii changes for form controls. For |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
827 // horizontal sizing, wrap controls in the predefined grid classes. `<select>` |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
828 // element gets special love because it's special, and that's a fact! |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
829 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
830 .input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
831 height: @input-height; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
832 padding: @padding-vertical @padding-horizontal; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
833 font-size: @font-size; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
834 line-height: @line-height; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
835 border-radius: @border-radius; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
836 |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
837 select& { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
838 height: @input-height; |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
839 line-height: @input-height; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
840 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
841 |
149
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
842 textarea& { |
d29e2f337b00
Updated to Bootstrap 3.0.
Ludovic Chabant <ludovic@chabant.com>
parents:
88
diff
changeset
|
843 height: auto; |
61
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
844 } |
130eccd396d8
Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
845 } |