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 /* .navbar .navbar-container | |
27 ****************************************************************************/ | |
28 | |
29 .navbar-container | |
30 { | |
31 @if ($add-horizontal-navbar-padding) | |
32 { | |
33 @extend .container; | |
34 } | |
35 @else | |
36 { | |
37 @include container($container-width, 0px); | |
38 } | |
39 } | |
40 | |
26 /* .navbar .navbar-branding | 41 /* .navbar .navbar-branding |
27 ****************************************************************************/ | 42 ****************************************************************************/ |
28 | 43 |
29 .navbar-branding | 44 .navbar-branding |
30 { | 45 { |
31 padding-top: $navbar-padding-v; | 46 padding-top: $navbar-padding + ($navbar-padding / 4); |
32 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 } | |
33 } | 55 } |
34 | 56 |
35 .navbar-branding img | 57 .navbar-branding img |
36 { | 58 { |
37 height: $navbar-branding-height; | 59 height: $navbar-branding-height; |
38 vertical-align: text-top; | 60 vertical-align: text-top; |
39 } | 61 } |
40 | 62 |
41 /* .navbar .toggle-navbar-collapse | 63 /* .navbar .toggle-navbar-collapse |
42 ****************************************************************************/ | 64 ****************************************************************************/ |
43 | 65 |
44 .toggle-navbar-collapse | 66 .toggle-navbar-collapse |
juliandoucette
2017/12/08 15:24:06
@extend .link?
(Maybe separately)
(border, backg
ire
2017/12/11 15:11:57
Done.
| |
45 { | 67 { |
46 display: none; | 68 display: none; |
47 margin: 0; | 69 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2); |
48 padding-top: $navbar-padding-v + ($navbar-padding-v / 2); | 70 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2); |
49 padding-bottom: $navbar-padding-v + ($navbar-padding-v / 2); | 71 |
50 border: none; | 72 @if ($add-horizontal-navbar-padding != true) |
51 background: none; | 73 { |
52 cursor: pointer; | 74 padding-right: $navbar-padding; |
75 padding-left: $navbar-padding; | |
76 } | |
53 } | 77 } |
54 | 78 |
55 .js .toggle-navbar-collapse | 79 .js .toggle-navbar-collapse |
56 { | 80 { |
57 display: block; | 81 display: block; |
58 | 82 |
59 @media (min-width: $tablet-breakpoint) | 83 @media (min-width: $tablet-breakpoint) |
60 { | 84 { |
61 display: none; | 85 display: none; |
62 } | 86 } |
63 } | 87 } |
64 | 88 |
65 /* .navbar .navbar-collapse | 89 /* .navbar .navbar-collapse |
66 ****************************************************************************/ | 90 ****************************************************************************/ |
67 | 91 |
68 .navbar-collapse | 92 .navbar-collapse |
69 { | 93 { |
70 clear: both; | 94 clear: both; |
juliandoucette
2017/12/08 15:24:07
NIT: @extend .clearfix?
ire
2017/12/11 15:11:57
I don't think more than `clear: both` is needed he
| |
71 padding-top: 0; | |
72 | 95 |
73 @media (min-width: $tablet-breakpoint) | 96 @media (min-width: $tablet-breakpoint) |
74 { | 97 { |
75 float: right; | 98 float: right; |
76 clear: none; | 99 clear: none; |
77 } | 100 } |
78 } | 101 } |
79 | 102 |
80 [dir="rtl"] .navbar-collapse | 103 [dir="rtl"] .navbar-collapse |
81 { | 104 { |
(...skipping 17 matching lines...) Expand all Loading... | |
99 | 122 |
100 @media (min-width: $tablet-breakpoint) | 123 @media (min-width: $tablet-breakpoint) |
101 { | 124 { |
102 width: auto; | 125 width: auto; |
103 } | 126 } |
104 } | 127 } |
105 | 128 |
106 /* .navbar .navbar-nav | 129 /* .navbar .navbar-nav |
107 ****************************************************************************/ | 130 ****************************************************************************/ |
108 | 131 |
109 .navbar .navbar-nav | 132 @if ($add-horizontal-navbar-padding) |
110 { | 133 { |
111 padding-bottom: $navbar-padding-v / 2; | 134 .navbar .navbar-nav |
135 { | |
136 padding-bottom: $navbar-padding / 2; | |
112 | 137 |
113 @media (min-width: $tablet-breakpoint) | 138 @media (min-width: $tablet-breakpoint) |
114 { | 139 { |
115 margin-right: -($navbar-padding-v / 2); | 140 margin-right: -($navbar-padding / 2); |
116 margin-left: -($navbar-padding-v / 2); | 141 margin-left: -($navbar-padding / 2); |
117 padding-bottom: 0; | 142 padding-bottom: 0; |
143 } | |
118 } | 144 } |
119 } | 145 } |
120 | 146 |
121 .navbar .navbar-nav li | 147 .navbar .navbar-nav li |
122 { | 148 { |
123 @media (min-width: $tablet-breakpoint) | 149 @media (min-width: $tablet-breakpoint) |
124 { | 150 { |
125 display: inline-block; | 151 display: inline-block; |
126 } | 152 } |
127 } | 153 } |
128 | 154 |
129 .navbar .navbar-nav a | 155 .navbar .navbar-nav a |
130 { | 156 { |
131 display: block; | 157 display: block; |
132 padding-top: $navbar-padding-v / 2; | 158 padding-top: $navbar-padding / 2; |
133 padding-bottom: $navbar-padding-v / 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 } | |
134 | 166 |
135 @media (min-width: $tablet-breakpoint) | 167 @media (min-width: $tablet-breakpoint) |
136 { | 168 { |
137 padding-top: $navbar-padding-v + ($navbar-padding-v / 2); | 169 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2); |
138 padding-right: $navbar-padding-v / 2; | 170 padding-right: $navbar-padding / 2; |
139 padding-bottom: $navbar-padding-v + ($navbar-padding-v / 2); | 171 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2); |
140 padding-left: $navbar-padding-v / 2; | 172 padding-left: $navbar-padding / 2; |
141 } | 173 } |
142 } | 174 } |
LEFT | RIGHT |