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

Unified 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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « static/scss/layout/_navbar.scss ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: static/scss/layout/_sidebar.scss
===================================================================
--- a/static/scss/layout/_sidebar.scss
+++ b/static/scss/layout/_sidebar.scss
@@ -125,49 +125,62 @@
right: 0;
text-align: left;
}
}
// Positioning the sidebar on tablet/mobile
@media(max-width: $sidebar-breakpoint-x - 1)
{
- #sidebar
- {
- margin-top: -64px;
- }
// sidebar appears below content by default on mobile (like a footer)
// when javascript is enabled, fix the sidebar (navbar with toggle menu) top
+
+ #sidebar
+ {
+ margin-top: -$mobile-sidebar-height;
+ }
+
.js #sidebar
{
- position: fixed;
- margin-top: 0;
z-index: 1;
top: 0;
left: 0;
+ margin-top: 0;
overflow: hidden;
width: 100%;
// when closed, show the top of the sidebar (just the navbar)
height: $lg;
}
+ html:not(.open-sidebar).mobile #sidebar
+ {
+ position: fixed;
+ transition: transform 0.2s ease-in-out;
+ }
+
+ html:not(.open-sidebar).mobile.scrollDown #sidebar
+ {
+ transform: translate(0,-$header-height);
+ }
+
#sidebar-menus
{
margin-top: 30px;
}
.js #sidebar-menus
{
margin-top: 0;
}
// when opened, show the rest
- .js #sidebar.open
+ .js.open-sidebar #sidebar
{
height: 100%;
+ position: fixed;
}
// align text opposite of desktop on mobile ltr and rtl
html[dir="ltr"].js #sidebar
{
text-align: left;
}
@@ -179,36 +192,36 @@
.js #sidebar
{
// show sidebar navbar title and open button by default
#sidebar-open
{
display: block;
}
+ }
- // Toggle open/close buttons
- &.open
- {
- #sidebar-open
- {
- display: none;
- }
- #sidebar-close
- {
- display: block;
- }
- }
- }
+ // Toggle open/close buttons
+ .js.open-sidebar #sidebar
+ {
+ #sidebar-open
+ {
+ display: none;
+ }
+ #sidebar-close
+ {
+ display: block;
+ }
+ }
#sidebar
{
.site-title
{
- display: block;
+ display: block;
}
#sidebar-brand
{
background-color: $inverted-fg;
}
#sidebar-open,
« 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