Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: static/scss/_navbar.scss

Issue 29587584: Issue 5635 - Implement website-default navbar component (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Left Patch Set: Demo of both methods Created Nov. 6, 2017, 8:18 a.m.
Right Patch Set: Rebase Created Jan. 4, 2018, 7:40 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « static/js/navbar.js ('k') | static/scss/_variables.scss » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 (Table Layout Method) 18 * Navbar component
19 ******************************************************************************/ 19 ******************************************************************************/
20 20
21 #table-navbar .navbar .container 21 .navbar
22 {
23 display: table;
24 width: 100%;
25 max-width: $large-desktop-width;
26 }
27
28 #table-navbar .navbar button
juliandoucette 2017/11/06 12:36:43 NIT: Perhaps button should normally inherit color?
ire 2017/11/08 17:14:46 Done.
29 {
30 color: inherit;
31 }
32
33 #table-navbar .navbar-branding,
34 #table-navbar .toggle-navbar-collapse,
35 #table-navbar .navbar-collapse
36 {
37 display: table-cell;
38 padding-top: $small-space;
39 padding-bottom: $small-space;
40 vertical-align: middle;
41 }
42
43 /* .navbar .toggle-navbar-collapse
44 ****************************************************************************/
45
46 #table-navbar .toggle-navbar-collapse
47 {
48 display: none;
49 }
50
51 .js #table-navbar .toggle-navbar-collapse
52 {
53 display: table-cell;
54
55 @media (min-width: $tablet-breakpoint)
56 {
57 display: none;
58 }
59 }
60
61 #table-navbar .toggle-navbar-collapse button
juliandoucette 2017/11/06 12:36:43 TOL: Perhaps we could use (extend) a (link button
ire 2017/11/08 17:14:46 Done.
62 {
63 min-width: 100px;
64 border: 0;
65 background-color: transparent;
66 cursor: pointer;
67 }
68
69 .js #table-navbar .toggle-navbar-collapse .close-label
70 {
71 display: none;
72 }
73
74 #table-navbar .expanded .toggle-navbar-collapse .open-label
75 {
76 display: none;
77 }
78
79 #table-navbar .expanded .toggle-navbar-collapse .close-label
80 {
81 display: inline;
82 }
83
84 /* .navbar .navbar-collapse
85 ****************************************************************************/
86
87 #table-navbar .navbar-collapse
88 {
89 display: table-row;
90 text-align: left;
91
92 @media (min-width: $tablet-breakpoint)
93 {
94 display: table-cell;
95 text-align: right;
96 }
97 }
98
99 [dir="rtl"] #table-navbar .navbar-collapse
100 {
101 text-align: right;
102
103 @media (min-width: $tablet-breakpoint)
104 {
105 text-align: left;
106 }
107 }
108
109 .js #table-navbar .navbar-collapse
110 {
111 display: none;
112
113 @media (min-width: $tablet-breakpoint)
114 {
115 display: table-cell;
116 }
117 }
118
119 #table-navbar .expanded .navbar-collapse
120 {
121 display: table-row;
122 }
123
124 .no-js #table-navbar .navbar-collapse:after,
125 #table-navbar .expanded .navbar-collapse:after
126 {
127 @media (max-width: $tablet-breakpoint + 1px)
128 {
129 display: block;
130 height: $small-space;
131 content: "";
132 }
133 }
134
135
136 /*******************************************************************************
137 * Navbar component (Float Method)
138 ******************************************************************************/
139
140 #floated-navbar .navbar
141 { 22 {
142 @extend .clearfix; 23 @extend .clearfix;
143 } 24 }
144 25
145 #floated-navbar .navbar button 26 /* .navbar .navbar-container
27 ****************************************************************************/
28
29 .navbar-container
146 { 30 {
147 border: 0; 31 @if ($add-horizontal-navbar-padding)
148 color: inherit; 32 {
149 background-color: transparent; 33 @extend .container;
150 cursor: pointer; 34 }
35 @else
36 {
37 @include container($container-width, 0px);
38 }
151 } 39 }
152 40
153 #floated-navbar .navbar-branding, 41 /* .navbar .navbar-branding
154 #floated-navbar .toggle-navbar-collapse, 42 ****************************************************************************/
155 #floated-navbar .navbar-collapse 43
44 .navbar-branding
156 { 45 {
157 padding-top: $small-space; 46 padding-top: $navbar-padding + ($navbar-padding / 4);
158 padding-bottom: $small-space; 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 }
55 }
56
57 .navbar-branding img
58 {
59 height: $navbar-branding-height;
60 vertical-align: text-top;
159 } 61 }
160 62
161 /* .navbar .toggle-navbar-collapse 63 /* .navbar .toggle-navbar-collapse
162 ****************************************************************************/ 64 ****************************************************************************/
163 65
164 #floated-navbar .toggle-navbar-collapse 66 .toggle-navbar-collapse
165 { 67 {
166 display: none; 68 display: none;
167 border: 0; 69 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2);
168 background-color: transparent; 70 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2);
169 cursor: pointer; 71
72 @if ($add-horizontal-navbar-padding != true)
73 {
74 padding-right: $navbar-padding;
75 padding-left: $navbar-padding;
76 }
170 } 77 }
171 78
172 .js #floated-navbar .toggle-navbar-collapse 79 .js .toggle-navbar-collapse
173 { 80 {
174 display: block; 81 display: block;
175 82
176 @media (min-width: $tablet-breakpoint) 83 @media (min-width: $tablet-breakpoint)
177 { 84 {
178 display: none; 85 display: none;
179 } 86 }
180 } 87 }
181 88
182 .js #floated-navbar .toggle-navbar-collapse .close-label 89 /* .navbar .navbar-collapse
183 { 90 ****************************************************************************/
184 display: none;
185 }
186 91
187 #floated-navbar .expanded .toggle-navbar-collapse .open-label 92 .navbar-collapse
188 {
189 display: none;
190 }
191
192 #floated-navbar .expanded .toggle-navbar-collapse .close-label
193 {
194 display: inline;
195 }
196
197 /* .navbar .navbar-collapse
198 ****************************************************************************/
199
200 #floated-navbar .navbar-collapse
201 { 93 {
202 clear: both; 94 clear: both;
203 padding-top: 0;
204 95
205 @media (min-width: $tablet-breakpoint) 96 @media (min-width: $tablet-breakpoint)
206 { 97 {
207 float: right; 98 float: right;
208 clear: none; 99 clear: none;
209 padding-top: $small-space;
210 } 100 }
211 } 101 }
212 102
213 [dir="rtl"] #floated-navbar .navbar-collapse 103 [dir="rtl"] .navbar-collapse
214 { 104 {
215 float: left; 105 float: left;
216 } 106 }
217 107
218 .js #floated-navbar .navbar-collapse 108 .js .navbar-collapse
219 { 109 {
220 display: none; 110 display: none;
221 111
222 @media (min-width: $tablet-breakpoint) 112 @media (min-width: $tablet-breakpoint)
223 { 113 {
224 display: block; 114 display: block;
225 } 115 }
226 } 116 }
227 117
228 #floated-navbar .expanded .navbar-collapse 118 .expanded .navbar-collapse
229 { 119 {
230 display: block; 120 display: block;
121 width: 100%;
122
123 @media (min-width: $tablet-breakpoint)
124 {
125 width: auto;
126 }
231 } 127 }
128
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
148 {
149 @media (min-width: $tablet-breakpoint)
150 {
151 display: inline-block;
152 }
153 }
154
155 .navbar .navbar-nav a
156 {
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 }
174 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld