info@53
|
1 |
//
|
info@53
|
2 |
// Navs
|
info@53
|
3 |
// --------------------------------------------------
|
info@53
|
4 |
|
info@53
|
5 |
|
info@53
|
6 |
// Base class
|
info@53
|
7 |
// --------------------------------------------------
|
info@53
|
8 |
|
info@53
|
9 |
.nav {
|
info@53
|
10 |
margin-bottom: 0;
|
info@53
|
11 |
padding-left: 0; // Override default ul/ol
|
info@53
|
12 |
list-style: none;
|
info@53
|
13 |
.clearfix();
|
info@53
|
14 |
|
info@53
|
15 |
> li {
|
info@53
|
16 |
position: relative;
|
info@53
|
17 |
display: block;
|
info@53
|
18 |
|
info@53
|
19 |
> a {
|
info@53
|
20 |
position: relative;
|
info@53
|
21 |
display: block;
|
info@53
|
22 |
padding: @nav-link-padding;
|
info@53
|
23 |
&:hover,
|
info@53
|
24 |
&:focus {
|
info@53
|
25 |
text-decoration: none;
|
info@53
|
26 |
background-color: @nav-link-hover-bg;
|
info@53
|
27 |
}
|
info@53
|
28 |
}
|
info@53
|
29 |
|
info@53
|
30 |
// Disabled state sets text to gray and nukes hover/tab effects
|
info@53
|
31 |
&.disabled > a {
|
info@53
|
32 |
color: @nav-disabled-link-color;
|
info@53
|
33 |
|
info@53
|
34 |
&:hover,
|
info@53
|
35 |
&:focus {
|
info@53
|
36 |
color: @nav-disabled-link-hover-color;
|
info@53
|
37 |
text-decoration: none;
|
info@53
|
38 |
background-color: transparent;
|
info@53
|
39 |
cursor: not-allowed;
|
info@53
|
40 |
}
|
info@53
|
41 |
}
|
info@53
|
42 |
}
|
info@53
|
43 |
|
info@53
|
44 |
// Open dropdowns
|
info@53
|
45 |
.open > a {
|
info@53
|
46 |
&,
|
info@53
|
47 |
&:hover,
|
info@53
|
48 |
&:focus {
|
info@53
|
49 |
background-color: @nav-link-hover-bg;
|
info@53
|
50 |
border-color: @link-color;
|
info@53
|
51 |
}
|
info@53
|
52 |
}
|
info@53
|
53 |
|
info@53
|
54 |
// Nav dividers (deprecated with v3.0.1)
|
info@53
|
55 |
//
|
info@53
|
56 |
// This should have been removed in v3 with the dropping of `.nav-list`, but
|
info@53
|
57 |
// we missed it. We don't currently support this anywhere, but in the interest
|
info@53
|
58 |
// of maintaining backward compatibility in case you use it, it's deprecated.
|
info@53
|
59 |
.nav-divider {
|
info@53
|
60 |
.nav-divider();
|
info@53
|
61 |
}
|
info@53
|
62 |
|
info@53
|
63 |
// Prevent IE8 from misplacing imgs
|
info@53
|
64 |
//
|
info@53
|
65 |
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
info@53
|
66 |
> li > a > img {
|
info@53
|
67 |
max-width: none;
|
info@53
|
68 |
}
|
info@53
|
69 |
}
|
info@53
|
70 |
|
info@53
|
71 |
|
info@53
|
72 |
// Tabs
|
info@53
|
73 |
// -------------------------
|
info@53
|
74 |
|
info@53
|
75 |
// Give the tabs something to sit on
|
info@53
|
76 |
.nav-tabs {
|
info@53
|
77 |
border-bottom: 1px solid @nav-tabs-border-color;
|
info@53
|
78 |
> li {
|
info@53
|
79 |
float: left;
|
info@53
|
80 |
// Make the list-items overlay the bottom border
|
info@53
|
81 |
margin-bottom: -1px;
|
info@53
|
82 |
|
info@53
|
83 |
// Actual tabs (as links)
|
info@53
|
84 |
> a {
|
info@53
|
85 |
margin-right: 2px;
|
info@53
|
86 |
line-height: @line-height-base;
|
info@53
|
87 |
border: 1px solid transparent;
|
info@53
|
88 |
border-radius: @border-radius-base @border-radius-base 0 0;
|
info@53
|
89 |
&:hover {
|
info@53
|
90 |
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
|
info@53
|
91 |
}
|
info@53
|
92 |
}
|
info@53
|
93 |
|
info@53
|
94 |
// Active state, and it's :hover to override normal :hover
|
info@53
|
95 |
&.active > a {
|
info@53
|
96 |
&,
|
info@53
|
97 |
&:hover,
|
info@53
|
98 |
&:focus {
|
info@53
|
99 |
color: @nav-tabs-active-link-hover-color;
|
info@53
|
100 |
background-color: @nav-tabs-active-link-hover-bg;
|
info@53
|
101 |
border: 1px solid @nav-tabs-active-link-hover-border-color;
|
info@53
|
102 |
border-bottom-color: transparent;
|
info@53
|
103 |
cursor: default;
|
info@53
|
104 |
}
|
info@53
|
105 |
}
|
info@53
|
106 |
}
|
info@53
|
107 |
// pulling this in mainly for less shorthand
|
info@53
|
108 |
&.nav-justified {
|
info@53
|
109 |
.nav-justified();
|
info@53
|
110 |
.nav-tabs-justified();
|
info@53
|
111 |
}
|
info@53
|
112 |
}
|
info@53
|
113 |
|
info@53
|
114 |
|
info@53
|
115 |
// Pills
|
info@53
|
116 |
// -------------------------
|
info@53
|
117 |
.nav-pills {
|
info@53
|
118 |
> li {
|
info@53
|
119 |
float: left;
|
info@53
|
120 |
|
info@53
|
121 |
// Links rendered as pills
|
info@53
|
122 |
> a {
|
info@53
|
123 |
border-radius: @nav-pills-border-radius;
|
info@53
|
124 |
}
|
info@53
|
125 |
+ li {
|
info@53
|
126 |
margin-left: 2px;
|
info@53
|
127 |
}
|
info@53
|
128 |
|
info@53
|
129 |
// Active state
|
info@53
|
130 |
&.active > a {
|
info@53
|
131 |
&,
|
info@53
|
132 |
&:hover,
|
info@53
|
133 |
&:focus {
|
info@53
|
134 |
color: @nav-pills-active-link-hover-color;
|
info@53
|
135 |
background-color: @nav-pills-active-link-hover-bg;
|
info@53
|
136 |
}
|
info@53
|
137 |
}
|
info@53
|
138 |
}
|
info@53
|
139 |
}
|
info@53
|
140 |
|
info@53
|
141 |
|
info@53
|
142 |
// Stacked pills
|
info@53
|
143 |
.nav-stacked {
|
info@53
|
144 |
> li {
|
info@53
|
145 |
float: none;
|
info@53
|
146 |
+ li {
|
info@53
|
147 |
margin-top: 2px;
|
info@53
|
148 |
margin-left: 0; // no need for this gap between nav items
|
info@53
|
149 |
}
|
info@53
|
150 |
}
|
info@53
|
151 |
}
|
info@53
|
152 |
|
info@53
|
153 |
|
info@53
|
154 |
// Nav variations
|
info@53
|
155 |
// --------------------------------------------------
|
info@53
|
156 |
|
info@53
|
157 |
// Justified nav links
|
info@53
|
158 |
// -------------------------
|
info@53
|
159 |
|
info@53
|
160 |
.nav-justified {
|
info@53
|
161 |
width: 100%;
|
info@53
|
162 |
|
info@53
|
163 |
> li {
|
info@53
|
164 |
float: none;
|
info@53
|
165 |
> a {
|
info@53
|
166 |
text-align: center;
|
info@53
|
167 |
margin-bottom: 5px;
|
info@53
|
168 |
}
|
info@53
|
169 |
}
|
info@53
|
170 |
|
info@53
|
171 |
> .dropdown .dropdown-menu {
|
info@53
|
172 |
top: auto;
|
info@53
|
173 |
left: auto;
|
info@53
|
174 |
}
|
info@53
|
175 |
|
info@53
|
176 |
@media (min-width: @screen-sm-min) {
|
info@53
|
177 |
> li {
|
info@53
|
178 |
display: table-cell;
|
info@53
|
179 |
width: 1%;
|
info@53
|
180 |
> a {
|
info@53
|
181 |
margin-bottom: 0;
|
info@53
|
182 |
}
|
info@53
|
183 |
}
|
info@53
|
184 |
}
|
info@53
|
185 |
}
|
info@53
|
186 |
|
info@53
|
187 |
// Move borders to anchors instead of bottom of list
|
info@53
|
188 |
//
|
info@53
|
189 |
// Mixin for adding on top the shared `.nav-justified` styles for our tabs
|
info@53
|
190 |
.nav-tabs-justified {
|
info@53
|
191 |
border-bottom: 0;
|
info@53
|
192 |
|
info@53
|
193 |
> li > a {
|
info@53
|
194 |
// Override margin from .nav-tabs
|
info@53
|
195 |
margin-right: 0;
|
info@53
|
196 |
border-radius: @border-radius-base;
|
info@53
|
197 |
}
|
info@53
|
198 |
|
info@53
|
199 |
> .active > a,
|
info@53
|
200 |
> .active > a:hover,
|
info@53
|
201 |
> .active > a:focus {
|
info@53
|
202 |
border: 1px solid @nav-tabs-justified-link-border-color;
|
info@53
|
203 |
}
|
info@53
|
204 |
|
info@53
|
205 |
@media (min-width: @screen-sm-min) {
|
info@53
|
206 |
> li > a {
|
info@53
|
207 |
border-bottom: 1px solid @nav-tabs-justified-link-border-color;
|
info@53
|
208 |
border-radius: @border-radius-base @border-radius-base 0 0;
|
info@53
|
209 |
}
|
info@53
|
210 |
> .active > a,
|
info@53
|
211 |
> .active > a:hover,
|
info@53
|
212 |
> .active > a:focus {
|
info@53
|
213 |
border-bottom-color: @nav-tabs-justified-active-link-border-color;
|
info@53
|
214 |
}
|
info@53
|
215 |
}
|
info@53
|
216 |
}
|
info@53
|
217 |
|
info@53
|
218 |
|
info@53
|
219 |
// Tabbable tabs
|
info@53
|
220 |
// -------------------------
|
info@53
|
221 |
|
info@53
|
222 |
// Hide tabbable panes to start, show them when `.active`
|
info@53
|
223 |
.tab-content {
|
info@53
|
224 |
> .tab-pane {
|
info@53
|
225 |
display: none;
|
info@53
|
226 |
}
|
info@53
|
227 |
> .active {
|
info@53
|
228 |
display: block;
|
info@53
|
229 |
}
|
info@53
|
230 |
}
|
info@53
|
231 |
|
info@53
|
232 |
|
info@53
|
233 |
// Dropdowns
|
info@53
|
234 |
// -------------------------
|
info@53
|
235 |
|
info@53
|
236 |
// Specific dropdowns
|
info@53
|
237 |
.nav-tabs .dropdown-menu {
|
info@53
|
238 |
// make dropdown border overlap tab border
|
info@53
|
239 |
margin-top: -1px;
|
info@53
|
240 |
// Remove the top rounded corners here since there is a hard edge above the menu
|
info@53
|
241 |
.border-top-radius(0);
|
info@53
|
242 |
}
|