Commit e2afc1f7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'dz-nicer-sidebar' into 'master'

Improves left static sidebar behaviour

List of changes:

* removed bottom 50px space that is no longer necessary with pin button at the top
* increased side padding so sidebar links are closer to counters
* use fixed weight pin icon so it correctly aligned with counters


cc @annabeldunstone @jschatz1 

See merge request !5251
parents eb65b78a c7818ed7
...@@ -55,10 +55,6 @@ ...@@ -55,10 +55,6 @@
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
@media (min-width: $sidebar-breakpoint) {
bottom: 50px;
}
&.navbar-collapse { &.navbar-collapse {
padding: 0 !important; padding: 0 !important;
} }
...@@ -76,7 +72,7 @@ ...@@ -76,7 +72,7 @@
} }
a { a {
padding: 7px 16px; padding: 7px $gl-sidebar-padding;
font-size: $gl-font-size; font-size: $gl-font-size;
line-height: 24px; line-height: 24px;
display: block; display: block;
...@@ -143,7 +139,7 @@ ...@@ -143,7 +139,7 @@
} }
.nav-header-btn { .nav-header-btn {
padding: 10px 16px; padding: 10px $gl-sidebar-padding;
color: inherit; color: inherit;
transition-duration: .3s; transition-duration: .3s;
position: absolute; position: absolute;
......
...@@ -64,6 +64,7 @@ $gl-btn-padding: 10px; ...@@ -64,6 +64,7 @@ $gl-btn-padding: 10px;
$gl-input-padding: 10px; $gl-input-padding: 10px;
$gl-vert-padding: 6px; $gl-vert-padding: 6px;
$gl-padding-top: 10px; $gl-padding-top: 10px;
$gl-sidebar-padding: 22px;
/* /*
* Misc * Misc
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= icon('bars') = icon('bars')
= link_to '#', class: "nav-header-btn pin-nav-btn has-tooltip #{'is-active' if pinned_nav?} js-nav-pin", title: pinned_nav? ? "Unpin navigation" : "Pin Navigation", data: {placement: 'right', container: 'body'} do = link_to '#', class: "nav-header-btn pin-nav-btn has-tooltip #{'is-active' if pinned_nav?} js-nav-pin", title: pinned_nav? ? "Unpin navigation" : "Pin Navigation", data: {placement: 'right', container: 'body'} do
%span.sr-only Toggle navigation pinning %span.sr-only Toggle navigation pinning
= icon('thumb-tack') = icon('fw thumb-tack')
- if defined?(sidebar) && sidebar - if defined?(sidebar) && sidebar
= render "layouts/nav/#{sidebar}" = render "layouts/nav/#{sidebar}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment