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

Side by Side Diff: static/scss/layout/_sidebar.scss

Issue 29794555: Noissue - Fix broken layout from changeset 1940351cdb4c (Closed) Base URL: https://hg.adblockplus.org/web.acceptableads.com
Patch Set: Created May 30, 2018, 10:17 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « static/scss/layout/_navbar.scss ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This file is part of acceptableads.org. 1 // This file is part of acceptableads.org.
2 // Copyright (C) 2016-present eyeo GmbH 2 // Copyright (C) 2016-present eyeo GmbH
3 // 3 //
4 // acceptableads.org is free software: you can redistribute it and/or modify 4 // acceptableads.org 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 // acceptableads.org is distributed in the hope that it will be useful, 9 // acceptableads.org 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
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 html[dir="rtl"] #sidebar 123 html[dir="rtl"] #sidebar
124 { 124 {
125 right: 0; 125 right: 0;
126 text-align: left; 126 text-align: left;
127 } 127 }
128 } 128 }
129 129
130 // Positioning the sidebar on tablet/mobile 130 // Positioning the sidebar on tablet/mobile
131 @media(max-width: $sidebar-breakpoint-x - 1) 131 @media(max-width: $sidebar-breakpoint-x - 1)
132 { 132 {
133 #sidebar
134 {
135 margin-top: -64px;
136 }
137 // sidebar appears below content by default on mobile (like a footer) 133 // sidebar appears below content by default on mobile (like a footer)
138 // when javascript is enabled, fix the sidebar (navbar with toggle menu) top 134 // when javascript is enabled, fix the sidebar (navbar with toggle menu) top
135
136 #sidebar
137 {
138 margin-top: -$mobile-sidebar-height;
139 }
140
139 .js #sidebar 141 .js #sidebar
140 { 142 {
141 position: fixed;
142 margin-top: 0;
143 z-index: 1; 143 z-index: 1;
144 top: 0; 144 top: 0;
145 left: 0; 145 left: 0;
146 margin-top: 0;
146 overflow: hidden; 147 overflow: hidden;
147 width: 100%; 148 width: 100%;
148 // when closed, show the top of the sidebar (just the navbar) 149 // when closed, show the top of the sidebar (just the navbar)
149 height: $lg; 150 height: $lg;
150 } 151 }
151 152
153 html:not(.open-sidebar).mobile #sidebar
154 {
155 position: fixed;
156 transition: transform 0.2s ease-in-out;
157 }
158
159 html:not(.open-sidebar).mobile.scrollDown #sidebar
160 {
161 transform: translate(0,-$header-height);
162 }
163
152 #sidebar-menus 164 #sidebar-menus
153 { 165 {
154 margin-top: 30px; 166 margin-top: 30px;
155 } 167 }
156 168
157 .js #sidebar-menus 169 .js #sidebar-menus
158 { 170 {
159 margin-top: 0; 171 margin-top: 0;
160 } 172 }
161 173
162 // when opened, show the rest 174 // when opened, show the rest
163 .js #sidebar.open 175 .js.open-sidebar #sidebar
164 { 176 {
165 height: 100%; 177 height: 100%;
178 position: fixed;
166 } 179 }
167 180
168 // align text opposite of desktop on mobile ltr and rtl 181 // align text opposite of desktop on mobile ltr and rtl
169 182
170 html[dir="ltr"].js #sidebar 183 html[dir="ltr"].js #sidebar
171 { 184 {
172 text-align: left; 185 text-align: left;
173 } 186 }
174 187
175 html[dir="rtl"].js #sidebar 188 html[dir="rtl"].js #sidebar
176 { 189 {
177 text-align: right; 190 text-align: right;
178 } 191 }
179 192
180 .js #sidebar 193 .js #sidebar
181 { 194 {
182 // show sidebar navbar title and open button by default 195 // show sidebar navbar title and open button by default
183 #sidebar-open 196 #sidebar-open
184 { 197 {
185 display: block; 198 display: block;
186 } 199 }
200 }
187 201
188 // Toggle open/close buttons 202 // Toggle open/close buttons
189 &.open 203 .js.open-sidebar #sidebar
190 { 204 {
191 #sidebar-open 205 #sidebar-open
192 { 206 {
193 display: none; 207 display: none;
194 } 208 }
195 #sidebar-close 209 #sidebar-close
196 { 210 {
197 display: block; 211 display: block;
198 } 212 }
199 } 213 }
200 }
201 214
202 #sidebar 215 #sidebar
203 { 216 {
204 .site-title 217 .site-title
205 { 218 {
206 display: block; 219 display: block;
207 } 220 }
208 221
209 #sidebar-brand 222 #sidebar-brand
210 { 223 {
211 background-color: $inverted-fg; 224 background-color: $inverted-fg;
212 } 225 }
213 226
214 #sidebar-open, 227 #sidebar-open,
215 #sidebar-close, 228 #sidebar-close,
216 #sidebar-logo, 229 #sidebar-logo,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 } 481 }
469 .js #secondary-navigation 482 .js #secondary-navigation
470 { 483 {
471 display: none; 484 display: none;
472 } 485 }
473 .js #sidebar.open #secondary-navigation 486 .js #sidebar.open #secondary-navigation
474 { 487 {
475 display: block; 488 display: block;
476 } 489 }
477 } 490 }
OLDNEW
« no previous file with comments | « static/scss/layout/_navbar.scss ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld