Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30354 from twbs/grid-xxl-and-sidebar-toc
v5: Add new `xxl` grid tier and move ToC to a sidebar
- Loading branch information
Showing
29 changed files
with
1,122 additions
and
853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.bd-layout { | ||
@include media-breakpoint-up(md) { | ||
display: grid; | ||
gap: $grid-gutter-width; | ||
grid-template-areas: | ||
"sidebar intro" | ||
"sidebar toc" | ||
"sidebar content"; | ||
grid-template-columns: 1fr 3fr; | ||
} | ||
|
||
@include media-breakpoint-up(lg) { | ||
grid-template-areas: | ||
"sidebar intro toc" | ||
"sidebar content toc"; | ||
grid-template-columns: 1fr 4fr 1fr; | ||
} | ||
} | ||
|
||
.bd-sidebar { | ||
grid-area: sidebar; | ||
} | ||
|
||
.bd-intro { | ||
grid-area: intro; | ||
} | ||
|
||
.bd-toc { | ||
grid-area: toc; | ||
} | ||
|
||
.bd-content { | ||
grid-area: content; | ||
min-width: 1px; // Fix width when bd-content contains a `<pre>` https://github.com/twbs/bootstrap/issues/25410 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,44 @@ | ||
// stylelint-disable selector-max-type, selector-max-compound-selectors | ||
// stylelint-disable selector-max-type | ||
|
||
.bd-toc nav { | ||
padding-top: .125em; | ||
padding-bottom: .125em; | ||
border-left: .25em solid $gray-200; | ||
|
||
> ul { | ||
margin-bottom: 0; | ||
.bd-toc { | ||
@include media-breakpoint-up(lg) { | ||
@supports (position: sticky) { | ||
position: sticky; | ||
top: 5rem; | ||
right: 0; | ||
z-index: 2; | ||
height: subtract(100vh, 7rem); | ||
overflow-y: auto; | ||
} | ||
} | ||
|
||
li ul li { | ||
margin-bottom: .25rem; | ||
list-style-type: disc; | ||
} | ||
nav { | ||
@include font-size(.875rem); | ||
|
||
a:not(:hover) { | ||
text-decoration: none; | ||
} | ||
ul { | ||
padding-left: 0; | ||
list-style: none; | ||
|
||
ul { | ||
padding-left: 1rem; | ||
margin-top: .25rem; | ||
} | ||
} | ||
|
||
li { | ||
margin-bottom: .25rem; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
|
||
&:not(:hover) { | ||
text-decoration: none; | ||
} | ||
|
||
a code { | ||
font: inherit; | ||
code { | ||
font: inherit; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.