0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

redesign sidebar a bit

This commit is contained in:
Mark Otto 2017-05-27 18:30:58 -07:00
parent 5b66579e4d
commit 3c838067a6

View File

@ -5,7 +5,6 @@
// //
.bd-sidebar { .bd-sidebar {
padding-top: 1rem;
background-color: #f5f5f5; background-color: #f5f5f5;
border-right: 1px solid rgba(0,0,0,.1); border-right: 1px solid rgba(0,0,0,.1);
@ -21,33 +20,12 @@
.bd-links { .bd-links {
margin-right: -15px; margin-right: -15px;
margin-left: -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 { .bd-search {
position: relative; position: relative;
padding-top: 1rem;
.form-control { padding-bottom: 1rem;
// 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 { .bd-search-results {
@ -84,59 +62,59 @@
.bd-toc-link { .bd-toc-link {
display: block; display: block;
// padding-top: .25rem;
// padding-bottom: .25rem;
padding: .75rem 1.5rem; padding: .75rem 1.5rem;
font-weight: 500;
color: $gray; color: $gray;
} }
.bd-toc-link:hover,
.bd-toc-link:focus { .bd-toc-link:hover {
color: $brand-primary; color: $brand-primary;
text-decoration: none; text-decoration: none;
} background-color: #fafafa;
.active > .bd-toc-link {
font-weight: 500;
color: $gray-dark;
}
.active > .bd-sidenav {
display: block;
} }
.bd-toc-item { .bd-toc-item {
&:first-child {
border-top: 1px solid $gray-lighter;
}
&:not(:last-child) { &:not(:last-child) {
border-bottom: 1px solid $gray-lighter; border-bottom: 1px solid $gray-lighter;
} }
&.active {
background-color: #fafafa;
> .bd-toc-link {
color: $gray-dark;
}
> .bd-sidenav {
display: block;
}
}
} }
.bd-toc-item.active { .bd-toc-item.active {
padding-top: .25rem; padding-top: .25rem;
padding-bottom: 1rem; padding-bottom: 1rem;
} }
.bd-toc-item:first-child {
// margin-top: 0;
}
.bd-toc-item:last-child {
// margin-bottom: 2rem;
}
// All levels of nav // All levels of nav
.bd-sidebar .nav > li > a { .bd-sidebar .nav > li > a {
display: block; display: block;
// padding-top: .25rem;
// padding-bottom: .25rem;
padding: .25rem 1.5rem; padding: .25rem 1.5rem;
font-size: 90%; font-size: 90%;
color: #99979c; color: #99979c;
} }
.bd-sidebar .nav > li > a:hover,
.bd-sidebar .nav > li > a:focus { .bd-sidebar .nav > li > a:hover {
color: $brand-primary; color: $brand-primary;
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
} }
.bd-sidebar .nav > .active > a, .bd-sidebar .nav > .active > a,
.bd-sidebar .nav > .active:hover > a, .bd-sidebar .nav > .active:hover > a {
.bd-sidebar .nav > .active:focus > a {
font-weight: 500; font-weight: 500;
color: $gray-dark; color: $gray-dark;
background-color: transparent; background-color: transparent;