0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00

Sidebar theming tweaks

This commit is contained in:
Martijn Cuppens 2019-07-25 08:18:36 +02:00 committed by XhmikosR
parent 0d1e259ecf
commit 2f4f15c018
2 changed files with 9 additions and 17 deletions

View File

@ -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 "/" -}} {{- $url := split .Permalink "/" -}}
{{- $page_slug := index $url (sub (len $url) 2) -}} {{- $page_slug := index $url (sub (len $url) 2) -}}

View File

@ -1,16 +1,12 @@
// stylelint-disable declaration-no-important // stylelint-disable declaration-no-important
.bd-sidebar {
order: 0;
}
.bd-links { .bd-links {
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
@supports (position: sticky) { @supports (position: sticky) {
position: sticky; position: sticky;
top: 5rem; top: 5rem;
z-index: 1000; z-index: 1000;
height: calc(100vh - 7rem); height: calc(100vh - 5rem);
overflow-y: auto; overflow-y: auto;
} }
} }
@ -21,21 +17,21 @@
} }
} }
.bd-sidenav { :not(.active) > .bd-sidenav {
display: none; display: none;
} }
.bd-sidenav-group-link { .bd-sidenav-group-link {
padding: .25rem .625rem .25rem .5rem; padding: .25rem .625rem .25rem .5rem;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, .65); color: rgba($black, .65);
@include border-radius(.25rem); @include border-radius(.25rem);
> * { pointer-events: none; } > * { pointer-events: none; }
&:hover, &:hover,
&:focus { &:focus {
color: rgba(0, 0, 0, .85); color: rgba($black, .85);
text-decoration: none; text-decoration: none;
background-color: rgba($bd-purple-bright, .1); background-color: rgba($bd-purple-bright, .1);
} }
@ -60,11 +56,7 @@
} }
> .bd-sidenav-group-link { > .bd-sidenav-group-link {
color: rgba(0, 0, 0, .85); color: rgba($black, .85);
}
> .bd-sidenav {
display: block;
} }
} }
} }
@ -77,12 +69,12 @@
display: inline-block; display: inline-block;
padding: .25rem .5rem; padding: .25rem .5rem;
@include font-size(.875rem); @include font-size(.875rem);
color: rgba(0, 0, 0, .65); color: rgba($black, .65);
@include border-radius(.25rem); @include border-radius(.25rem);
&:hover, &:hover,
&:focus { &:focus {
color: rgba(0, 0, 0, .85); color: rgba($white, .85);
text-decoration: none; text-decoration: none;
background-color: rgba($bd-purple-bright, .1); background-color: rgba($bd-purple-bright, .1);
} }
@ -92,6 +84,6 @@
> .active:hover > a, > .active:hover > a,
> .active:focus > a { > .active:focus > a {
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, .85); color: rgba($black, .85);
} }
} }