0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-30 12:24:19 +01:00
Bootstrap/docs/assets/scss/_sidebar.scss
2017-05-27 17:36:35 -07:00

143 lines
2.4 KiB
SCSS

// scss-lint:disable VendorPrefix
//
// Side navigation
//
.bd-sidebar {
padding-top: 1rem;
background-color: #f5f5f5;
border-right: 1px solid rgba(0,0,0,.1);
@include media-breakpoint-up(md) {
position: sticky;
top: 4rem;
max-height: calc(100vh - 4rem);
overflow-y: auto;
}
}
.bd-links {
margin-right: -15px;
margin-left: -15px;
// padding-top: .25rem;
// padding-bottom: .25rem;
// border: 1px solid $gray-lighter;
// border-radius: .25rem;
@include media-breakpoint-up(md) {
// margin-right: 1.5rem;
}
}
.bd-search {
position: relative;
.form-control {
// height: 2.45rem;
// padding-top: .4rem;
// padding-bottom: .4rem;
background-color: #fafafa;
&:focus {
background-color: #fff;
}
}
@include media-breakpoint-up(md) {
// padding-right: 1rem;
}
}
.bd-search-results {
right: 0;
display: block;
padding: 0;
overflow: hidden;
font-size: .85rem;
&:empty {
display: none;
}
.dropdown-item {
padding-right: .75rem;
padding-left: .75rem;
&:first-child { margin-top: .25rem; }
&:last-child { margin-bottom: .25rem; }
}
.no-results {
padding: .75rem 1rem;
color: #7a7a7a;
text-align: center;
white-space: normal; // Undo .dropdown-item defaults
}
}
.bd-sidenav {
display: none;
}
.bd-toc-link {
display: block;
// padding-top: .25rem;
// padding-bottom: .25rem;
padding: .75rem 1.5rem;
color: $gray;
}
.bd-toc-link:hover,
.bd-toc-link:focus {
color: $brand-primary;
text-decoration: none;
}
.active > .bd-toc-link {
font-weight: 500;
color: $gray-dark;
}
.active > .bd-sidenav {
display: block;
}
.bd-toc-item {
&:not(:last-child) {
border-bottom: 1px solid $gray-lighter;
}
}
.bd-toc-item.active {
padding-top: .25rem;
padding-bottom: 1rem;
}
.bd-toc-item:first-child {
// margin-top: 0;
}
.bd-toc-item:last-child {
// margin-bottom: 2rem;
}
// All levels of nav
.bd-sidebar .nav > li > a {
display: block;
// padding-top: .25rem;
// padding-bottom: .25rem;
padding: .25rem 1.5rem;
font-size: 90%;
color: #99979c;
}
.bd-sidebar .nav > li > a:hover,
.bd-sidebar .nav > li > a:focus {
color: $brand-primary;
text-decoration: none;
background-color: transparent;
}
.bd-sidebar .nav > .active > a,
.bd-sidebar .nav > .active:hover > a,
.bd-sidebar .nav > .active:focus > a {
font-weight: 500;
color: $gray-dark;
background-color: transparent;
}