Skip to content

Commit

Permalink
Sidebar theming tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens authored and XhmikosR committed Jul 25, 2019
1 parent 0d1e259 commit 2f4f15c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion site/layouts/partials/docs-sidebar.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<nav class="collapse bd-links pb-3" id="bd-docs-nav" aria-label="Main navigation">
<nav class="collapse bd-links" id="bd-docs-nav" aria-label="Main navigation">
{{- $url := split .Permalink "/" -}}
{{- $page_slug := index $url (sub (len $url) 2) -}}

Expand Down
24 changes: 8 additions & 16 deletions site/static/docs/4.3/assets/scss/_sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
// stylelint-disable declaration-no-important

.bd-sidebar {
order: 0;
}

.bd-links {
@include media-breakpoint-up(md) {
@supports (position: sticky) {
position: sticky;
top: 5rem;
z-index: 1000;
height: calc(100vh - 7rem);
height: calc(100vh - 5rem);
overflow-y: auto;
}
}
Expand All @@ -21,21 +17,21 @@
}
}

.bd-sidenav {
:not(.active) > .bd-sidenav {
display: none;
}

.bd-sidenav-group-link {
padding: .25rem .625rem .25rem .5rem;
font-weight: 600;
color: rgba(0, 0, 0, .65);
color: rgba($black, .65);
@include border-radius(.25rem);

> * { pointer-events: none; }

&:hover,
&:focus {
color: rgba(0, 0, 0, .85);
color: rgba($black, .85);
text-decoration: none;
background-color: rgba($bd-purple-bright, .1);
}
Expand All @@ -60,11 +56,7 @@
}

> .bd-sidenav-group-link {
color: rgba(0, 0, 0, .85);
}

> .bd-sidenav {
display: block;
color: rgba($black, .85);
}
}
}
Expand All @@ -77,12 +69,12 @@
display: inline-block;
padding: .25rem .5rem;
@include font-size(.875rem);
color: rgba(0, 0, 0, .65);
color: rgba($black, .65);
@include border-radius(.25rem);

&:hover,
&:focus {
color: rgba(0, 0, 0, .85);
color: rgba($white, .85);
text-decoration: none;
background-color: rgba($bd-purple-bright, .1);
}
Expand All @@ -92,6 +84,6 @@
> .active:hover > a,
> .active:focus > a {
font-weight: 600;
color: rgba(0, 0, 0, .85);
color: rgba($black, .85);
}
}

0 comments on commit 2f4f15c

Please sign in to comment.