2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00
Files
bootstrap/site/assets/scss/_sidebar.scss
T
Mark Otto 0bf9187ee3 Redesign docs layout
- New navbar, no more subnav. Migrated search and version picker into the main navbar and refreshed the design of it all, including the responsive toggles.
- New sidebar navigation is always expanded, and now features Bootstrap Icons alongside section headings
- Sidebar navigation autoscrolls to active link for better usability
- Subnav and navbar padding issues ironed out
- Enhanced the version picker in anticipation of v5.2: we can now link right to the same page in the previous version.
- Redesign callouts to add more color to our pages
- Collapse table of contents on mobile
- Cleanup and redesign button styles with CSS variables
- Update design for subnav version dropdown
- Update highlight and example to be full-width until md
- Improve the Added In badges
- Turn the ToC into a well on mobile
2022-02-23 11:46:05 -08:00

65 lines
1.3 KiB
SCSS

.bd-sidebar {
@include media-breakpoint-down(md) {
margin: 0 calc(var(--bs-gutter-x) * -.5) 1rem; // stylelint-disable-line function-disallowed-list
}
}
.bd-links {
overflow: auto;
@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, 6rem);
// Prevent focus styles to be cut off:
padding-left: .25rem;
margin-left: -.25rem;
overflow-y: auto;
}
}
.bd-links-nav {
@include media-breakpoint-down(md) {
padding: 1.5rem 1.25rem;
font-size: .875rem;
background-color: $gray-100;
border-bottom: 1px solid $gray-200;
}
@include media-breakpoint-between(xs, md) {
column-count: 2;
column-gap: 1.5rem;
.bd-links-group {
break-inside: avoid;
}
.bd-links-span-all {
column-span: all;
}
}
}
.bd-links-link {
padding: .1875rem .5rem;
margin-top: .125rem;
margin-left: 1.125rem;
color: rgba($black, .65);
text-decoration: if($link-decoration == none, null, none);
&:hover,
&:focus,
&.active {
color: rgba($black, .85);
text-decoration: if($link-hover-decoration == underline, none, null);
background-color: rgba(var(--bd-violet-rgb), .1);
}
&.active {
font-weight: 600;
}
}