Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 // This file is part of help.eyeo.com. | 1 // This file is part of help.eyeo.com. |
2 // Copyright (C) 2017 Eyeo GmbH | 2 // Copyright (C) 2017 Eyeo GmbH |
3 // | 3 // |
4 // help.eyeo.com is free software: you can redistribute it and/or modify | 4 // help.eyeo.com is free software: you can redistribute it and/or modify |
5 // it under the terms of the GNU General Public License as published by | 5 // it under the terms of the GNU General Public License as published by |
6 // the Free Software Foundation, either version 3 of the License, or | 6 // the Free Software Foundation, either version 3 of the License, or |
7 // (at your option) any later version. | 7 // (at your option) any later version. |
8 // | 8 // |
9 // help.eyeo.com is distributed in the hope that it will be useful, | 9 // help.eyeo.com is distributed in the hope that it will be useful, |
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 // GNU General Public License for more details. | 12 // GNU General Public License for more details. |
13 // | 13 // |
14 // You should have received a copy of the GNU General Public License | 14 // You should have received a copy of the GNU General Public License |
15 // along with help.eyeo.com. If not, see <http://www.gnu.org/licenses/>. | 15 // along with help.eyeo.com. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 |
17 /******************************************************************************* | 17 /******************************************************************************* |
18 * Navbar component | 18 * Navbar component |
19 ******************************************************************************/ | 19 ******************************************************************************/ |
20 | 20 |
21 .navbar | 21 .navbar |
22 { | 22 { |
23 @extend .clearfix; | 23 @extend .clearfix; |
24 } | 24 } |
25 | 25 |
26 .toggle-navbar-collapse, | 26 /* .navbar .navbar-container |
27 .navbar-collapse | 27 ****************************************************************************/ |
28 | |
29 .navbar-container | |
28 { | 30 { |
29 padding-top: $navbar-padding-v + ($navbar-padding-v / 2); | 31 @if ($add-horizontal-navbar-padding) |
30 padding-bottom: $navbar-padding-v + ($navbar-padding-v / 2); | 32 { |
33 @extend .container; | |
34 } | |
35 @else | |
36 { | |
37 @include container($container-width, 0px); | |
38 } | |
31 } | 39 } |
32 | 40 |
33 /* .navbar .navbar-branding | 41 /* .navbar .navbar-branding |
34 ****************************************************************************/ | 42 ****************************************************************************/ |
35 | 43 |
36 .navbar-branding | 44 .navbar-branding |
37 { | 45 { |
38 padding-top: $navbar-padding-v; | 46 padding-top: $navbar-padding + ($navbar-padding / 4); |
39 padding-bottom: $navbar-padding-v; | 47 padding-bottom: $navbar-padding + ($navbar-padding / 4); |
48 line-height: 1; | |
49 | |
50 @if ($add-horizontal-navbar-padding != true) | |
51 { | |
52 padding-right: $navbar-padding; | |
53 padding-left: $navbar-padding; | |
54 } | |
40 } | 55 } |
41 | 56 |
42 .navbar-branding img | 57 .navbar-branding img |
43 { | 58 { |
44 height: $navbar-branding-height; | 59 height: $navbar-branding-height; |
45 vertical-align: text-top; | 60 vertical-align: text-top; |
46 } | 61 } |
47 | 62 |
48 /* .navbar .toggle-navbar-collapse | 63 /* .navbar .toggle-navbar-collapse |
49 ****************************************************************************/ | 64 ****************************************************************************/ |
50 | 65 |
51 .toggle-navbar-collapse | 66 .toggle-navbar-collapse |
52 { | 67 { |
53 @extend .unstyled; | |
54 display: none; | 68 display: none; |
55 cursor: pointer; | 69 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2); |
70 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2); | |
71 | |
72 @if ($add-horizontal-navbar-padding != true) | |
73 { | |
74 padding-right: $navbar-padding; | |
75 padding-left: $navbar-padding; | |
76 } | |
56 } | 77 } |
57 | 78 |
58 .js .toggle-navbar-collapse | 79 .js .toggle-navbar-collapse |
59 { | 80 { |
60 display: block; | 81 display: block; |
61 | 82 |
62 @media (min-width: $tablet-breakpoint) | 83 @media (min-width: $tablet-breakpoint) |
63 { | 84 { |
64 display: none; | 85 display: none; |
65 } | 86 } |
66 } | 87 } |
67 | 88 |
68 .js .toggle-navbar-collapse .close-label | |
69 { | |
70 display: none; | |
71 } | |
72 | |
73 .expanded .toggle-navbar-collapse .open-label | |
74 { | |
75 display: none; | |
76 } | |
77 | |
78 .expanded .toggle-navbar-collapse .close-label | |
79 { | |
80 display: inline; | |
81 } | |
82 | |
83 /* .navbar .navbar-collapse | 89 /* .navbar .navbar-collapse |
84 ****************************************************************************/ | 90 ****************************************************************************/ |
85 | 91 |
86 .navbar-collapse | 92 .navbar-collapse |
87 { | 93 { |
88 clear: both; | 94 clear: both; |
89 padding-top: 0; | |
90 | 95 |
91 @media (min-width: $tablet-breakpoint) | 96 @media (min-width: $tablet-breakpoint) |
92 { | 97 { |
93 float: right; | 98 float: right; |
94 clear: none; | 99 clear: none; |
95 padding-top: $navbar-padding-v + ($navbar-padding-v / 2); | |
96 } | 100 } |
97 } | 101 } |
98 | 102 |
99 [dir="rtl"] .navbar-collapse | 103 [dir="rtl"] .navbar-collapse |
100 { | 104 { |
101 float: left; | 105 float: left; |
102 } | 106 } |
103 | 107 |
104 .js .navbar-collapse | 108 .js .navbar-collapse |
105 { | 109 { |
106 display: none; | 110 display: none; |
107 | 111 |
108 @media (min-width: $tablet-breakpoint) | 112 @media (min-width: $tablet-breakpoint) |
109 { | 113 { |
110 display: block; | 114 display: block; |
111 } | 115 } |
112 } | 116 } |
113 | 117 |
114 .expanded .navbar-collapse | 118 .expanded .navbar-collapse |
115 { | 119 { |
116 display: block; | 120 display: block; |
117 width: 100%; | 121 width: 100%; |
118 } | |
119 | |
120 /* .navbar .nav | |
121 ****************************************************************************/ | |
122 | |
123 .navbar .navbar-nav li | |
124 { | |
125 margin-bottom: $navbar-padding-v; | |
juliandoucette
2017/11/15 12:56:42
It's inconvenient that you chose to use margin-bot
ire
2017/11/30 14:01:18
Done.
| |
126 | 122 |
127 @media (min-width: $tablet-breakpoint) | 123 @media (min-width: $tablet-breakpoint) |
128 { | 124 { |
129 display: inline-block; | 125 width: auto; |
130 margin: 0 0 0 $navbar-padding-v; | |
131 } | 126 } |
132 } | 127 } |
133 | 128 |
134 [dir="rtl"] .navbar .navbar-nav li | 129 /* .navbar .navbar-nav |
130 ****************************************************************************/ | |
131 | |
132 @if ($add-horizontal-navbar-padding) | |
133 { | |
134 .navbar .navbar-nav | |
135 { | |
136 padding-bottom: $navbar-padding / 2; | |
137 | |
138 @media (min-width: $tablet-breakpoint) | |
139 { | |
140 margin-right: -($navbar-padding / 2); | |
141 margin-left: -($navbar-padding / 2); | |
142 padding-bottom: 0; | |
143 } | |
144 } | |
145 } | |
146 | |
147 .navbar .navbar-nav li | |
135 { | 148 { |
136 @media (min-width: $tablet-breakpoint) | 149 @media (min-width: $tablet-breakpoint) |
137 { | 150 { |
138 display: inline-block; | 151 display: inline-block; |
139 margin: 0 $navbar-padding-v 0 0; | |
140 } | 152 } |
141 } | |
142 | |
143 .navbar .navbar-nav li:last-child | |
juliandoucette
2017/11/15 12:56:42
Why use the paren't padding instead of the child's
ire
2017/11/30 14:01:19
Done.
| |
144 { | |
145 margin-bottom: 0; | |
146 } | 153 } |
147 | 154 |
148 .navbar .navbar-nav a | 155 .navbar .navbar-nav a |
149 { | 156 { |
150 display: block; | 157 display: block; |
158 padding-top: $navbar-padding / 2; | |
159 padding-bottom: $navbar-padding / 2; | |
160 | |
161 @if ($add-horizontal-navbar-padding != true) | |
162 { | |
163 padding-right: $navbar-padding; | |
164 padding-left: $navbar-padding; | |
165 } | |
166 | |
167 @media (min-width: $tablet-breakpoint) | |
168 { | |
169 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2); | |
170 padding-right: $navbar-padding / 2; | |
171 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2); | |
172 padding-left: $navbar-padding / 2; | |
173 } | |
151 } | 174 } |
LEFT | RIGHT |