0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +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 "/" -}}
{{- $page_slug := index $url (sub (len $url) 2) -}}

View File

@ -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;
}
}
@ -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);
}
@ -60,11 +56,7 @@
}
> .bd-sidenav-group-link {
color: rgba(0, 0, 0, .85);
}
> .bd-sidenav {
display: block;
color: rgba($black, .85);
}
}
}
@ -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);
}
@ -92,6 +84,6 @@
> .active:hover > a,
> .active:focus > a {
font-weight: 600;
color: rgba(0, 0, 0, .85);
color: rgba($black, .85);
}
}