| 1 |
efrain |
1 |
// Contents
|
|
|
2 |
//
|
|
|
3 |
// Navbar
|
|
|
4 |
// Navbar brand
|
|
|
5 |
// Navbar nav
|
|
|
6 |
// Navbar text
|
|
|
7 |
// Navbar divider
|
|
|
8 |
// Responsive navbar
|
|
|
9 |
// Navbar position
|
|
|
10 |
// Navbar themes
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
// Navbar
|
|
|
14 |
//
|
|
|
15 |
// Provide a static navbar from which we expand to create full-width, fixed, and
|
|
|
16 |
// other navbar variations.
|
|
|
17 |
|
|
|
18 |
.navbar {
|
|
|
19 |
position: relative;
|
|
|
20 |
display: flex;
|
|
|
21 |
flex-wrap: wrap; // allow us to do the line break for collapsing content
|
|
|
22 |
align-items: center;
|
|
|
23 |
justify-content: space-between; // space out brand from logo
|
|
|
24 |
padding: $navbar-padding-y $navbar-padding-x;
|
|
|
25 |
|
|
|
26 |
// Because flex properties aren't inherited, we need to redeclare these first
|
|
|
27 |
// few properties so that content nested within behave properly.
|
|
|
28 |
%container-flex-properties {
|
|
|
29 |
display: flex;
|
|
|
30 |
flex-wrap: wrap;
|
|
|
31 |
align-items: center;
|
|
|
32 |
justify-content: space-between;
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
.container,
|
|
|
36 |
.container-fluid {
|
|
|
37 |
@extend %container-flex-properties;
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
@each $breakpoint,
|
|
|
41 |
$container-max-width in $container-max-widths {
|
|
|
42 |
>.container#{breakpoint-infix($breakpoint, $container-max-widths)} {
|
|
|
43 |
@extend %container-flex-properties;
|
|
|
44 |
}
|
|
|
45 |
}
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
// Navbar brand
|
|
|
50 |
//
|
|
|
51 |
// Used for brand, project, or site names.
|
|
|
52 |
|
|
|
53 |
.navbar-brand {
|
|
|
54 |
display: inline-block;
|
|
|
55 |
padding-top: $navbar-brand-padding-y;
|
|
|
56 |
padding-bottom: $navbar-brand-padding-y;
|
|
|
57 |
margin-right: 25px;
|
|
|
58 |
@include font-size($navbar-brand-font-size);
|
|
|
59 |
line-height: inherit;
|
|
|
60 |
white-space: nowrap;
|
|
|
61 |
|
|
|
62 |
@include hover-focus() {
|
|
|
63 |
text-decoration: none;
|
|
|
64 |
}
|
|
|
65 |
}
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
// Navbar nav
|
|
|
69 |
//
|
|
|
70 |
// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
|
|
|
71 |
|
|
|
72 |
.navbar-nav {
|
|
|
73 |
display: flex;
|
|
|
74 |
flex-direction: row; // cannot use `inherit` to get the `.navbar`s value
|
|
|
75 |
padding-left: 0;
|
|
|
76 |
margin-bottom: 0;
|
|
|
77 |
list-style: none;
|
|
|
78 |
|
|
|
79 |
.nav-link {
|
|
|
80 |
padding-right: 0;
|
|
|
81 |
padding-left: 0;
|
|
|
82 |
}
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
// Navbar text
|
|
|
87 |
//
|
|
|
88 |
//
|
|
|
89 |
|
|
|
90 |
.navbar-text {
|
|
|
91 |
display: inline-block;
|
|
|
92 |
padding-top: $nav-link-padding-y;
|
|
|
93 |
padding-bottom: $nav-link-padding-y;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
// Responsive navbar
|
|
|
98 |
//
|
|
|
99 |
// Custom styles for responsive collapsing and toggling of navbar contents.
|
|
|
100 |
// Powered by the collapse Bootstrap JavaScript plugin.
|
|
|
101 |
|
|
|
102 |
// When collapsed, prevent the toggleable navbar contents from appearing in
|
|
|
103 |
// the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
|
|
|
104 |
// on the `.navbar` parent.
|
|
|
105 |
.navbar-collapse {
|
|
|
106 |
flex-basis: 100%;
|
|
|
107 |
flex-grow: 1;
|
|
|
108 |
// For always expanded or extra full navbars, ensure content aligns itself
|
|
|
109 |
// properly vertically. Can be easily overridden with flex utilities.
|
|
|
110 |
align-items: center;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
// Button for toggling the navbar when in its collapsed state
|
|
|
114 |
.navbar-toggler {
|
|
|
115 |
padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
|
|
|
116 |
@include font-size($navbar-toggler-font-size);
|
|
|
117 |
line-height: 1;
|
|
|
118 |
background-color: transparent; // remove default button style
|
|
|
119 |
border: $border-width solid transparent; // remove default button style
|
|
|
120 |
@include border-radius($navbar-toggler-border-radius);
|
|
|
121 |
|
|
|
122 |
@include hover-focus() {
|
|
|
123 |
text-decoration: none;
|
|
|
124 |
}
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
// Keep as a separate element so folks can easily override it with another icon
|
|
|
128 |
// or image file as needed.
|
|
|
129 |
.navbar-toggler-icon {
|
|
|
130 |
display: inline-block;
|
|
|
131 |
width: 1.5em;
|
|
|
132 |
height: 1.5em;
|
|
|
133 |
vertical-align: middle;
|
|
|
134 |
content: "";
|
|
|
135 |
background: no-repeat center center;
|
|
|
136 |
background-size: 100% 100%;
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
// Generate series of `.navbar-expand-*` responsive classes for configuring
|
|
|
140 |
// where your navbar collapses.
|
|
|
141 |
.navbar-expand {
|
|
|
142 |
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
|
143 |
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
|
|
144 |
$infix: breakpoint-infix($next, $grid-breakpoints);
|
|
|
145 |
|
|
|
146 |
&#{$infix} {
|
|
|
147 |
@include media-breakpoint-down($breakpoint) {
|
|
|
148 |
%container-navbar-expand-#{$breakpoint} {
|
|
|
149 |
padding-right: 0;
|
|
|
150 |
padding-left: 0;
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
>.container,
|
|
|
154 |
>.container-fluid {
|
|
|
155 |
@extend %container-navbar-expand-#{$breakpoint};
|
|
|
156 |
}
|
|
|
157 |
|
|
|
158 |
@each $size,
|
|
|
159 |
$container-max-width in $container-max-widths {
|
|
|
160 |
>.container#{breakpoint-infix($size, $container-max-widths)} {
|
|
|
161 |
@extend %container-navbar-expand-#{$breakpoint};
|
|
|
162 |
}
|
|
|
163 |
}
|
|
|
164 |
}
|
|
|
165 |
|
|
|
166 |
@include media-breakpoint-up($next) {
|
|
|
167 |
flex-flow: row nowrap;
|
|
|
168 |
justify-content: flex-start;
|
|
|
169 |
|
|
|
170 |
.navbar-nav {
|
|
|
171 |
flex-direction: row;
|
|
|
172 |
|
|
|
173 |
.dropdown-menu {
|
|
|
174 |
position: absolute;
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
.nav-link {
|
|
|
178 |
padding-right: $navbar-nav-link-padding-x;
|
|
|
179 |
padding-left: $navbar-nav-link-padding-x;
|
|
|
180 |
}
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
// For nesting containers, have to redeclare for alignment purposes
|
|
|
184 |
%container-nesting-#{$breakpoint} {
|
|
|
185 |
flex-wrap: nowrap;
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
>.container,
|
|
|
189 |
>.container-fluid {
|
|
|
190 |
@extend %container-nesting-#{$breakpoint};
|
|
|
191 |
}
|
|
|
192 |
|
|
|
193 |
@each $size,
|
|
|
194 |
$container-max-width in $container-max-widths {
|
|
|
195 |
>.container#{breakpoint-infix($size, $container-max-widths)} {
|
|
|
196 |
@extend %container-nesting-#{$breakpoint};
|
|
|
197 |
}
|
|
|
198 |
}
|
|
|
199 |
|
|
|
200 |
.navbar-nav-scroll {
|
|
|
201 |
overflow: visible;
|
|
|
202 |
}
|
|
|
203 |
|
|
|
204 |
.navbar-collapse {
|
|
|
205 |
display: flex !important; // stylelint-disable-line declaration-no-important
|
|
|
206 |
|
|
|
207 |
// Changes flex-bases to auto because of an IE10 bug
|
|
|
208 |
flex-basis: auto;
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
.navbar-toggler {
|
|
|
212 |
display: none;
|
|
|
213 |
}
|
|
|
214 |
}
|
|
|
215 |
}
|
|
|
216 |
}
|
|
|
217 |
}
|