mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-04 16:24:22 +01:00
74279460c2
* Hide the docs nav on mobile, redesign it for two columns on narrow devices * Tweak spacing on ToC * Redesign sidebar and subnav * Revamp subnav mobile layout so everything's on one line * Tighten up masthead a little * Switch the icon for the subnav and do a little icon toggling * Fix mobile overflow since we changed guters stuff * Add the widths * make the subnav icon purple
75 lines
1.6 KiB
SCSS
75 lines
1.6 KiB
SCSS
.bd-sidebar {
|
|
@include media-breakpoint-down(md) {
|
|
margin: 0 -.75rem 1rem;
|
|
}
|
|
}
|
|
|
|
.bd-links {
|
|
overflow: auto;
|
|
font-weight: 600;
|
|
|
|
@include media-breakpoint-up(md) {
|
|
position: sticky;
|
|
top: 5rem;
|
|
// Override collapse behaviors
|
|
// stylelint-disable-next-line declaration-no-important
|
|
display: block !important;
|
|
height: subtract(100vh, 7rem);
|
|
// Prevent focus styles to be cut off:
|
|
padding-left: .25rem;
|
|
margin-left: -.25rem;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
> ul {
|
|
@include media-breakpoint-down(md) {
|
|
padding: 1.5rem .75rem;
|
|
background-color: $gray-100;
|
|
border-bottom: 1px solid $gray-200;
|
|
}
|
|
}
|
|
|
|
a {
|
|
padding: .1875rem .5rem;
|
|
margin-top: .125rem;
|
|
color: rgba($black, .65);
|
|
text-decoration: if($link-decoration == none, null, none);
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: rgba($black, .85);
|
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
|
background-color: rgba($bd-purple-bright, .1);
|
|
}
|
|
|
|
// Indent if there's no submenu
|
|
&:only-child {
|
|
margin-left: 1.25rem;
|
|
}
|
|
|
|
// Add chevron if there's a submenu
|
|
&:not(:only-child) {
|
|
&::before {
|
|
width: 1.25em;
|
|
line-height: 0; // Align in the middle
|
|
content: escape-svg($sidebar-collapse-icon);
|
|
@include transition(transform .35s ease);
|
|
transform-origin: .5em 50%;
|
|
}
|
|
|
|
&:not(.collapsed) {
|
|
color: rgba($black, .85);
|
|
|
|
&::before {
|
|
transform: rotate(90deg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.active {
|
|
font-weight: 600;
|
|
color: rgba($black, .85);
|
|
}
|
|
}
|