| 1 |
/** |
| 2 |
* Main content area |
| 3 |
*/ |
| 4 |
.bd-main { |
| 5 |
flex-grow: 1; |
| 6 |
flex-direction: column; |
| 7 |
display: flex; |
| 8 |
min-width: 0; |
| 9 |
|
| 10 |
.bd-content { |
| 11 |
display: flex; |
| 12 |
justify-content: center; |
| 13 |
height: 100%; |
| 14 |
|
| 15 |
.bd-article-container { |
| 16 |
justify-content: start; |
| 17 |
display: flex; |
| 18 |
flex-direction: column; |
| 19 |
|
| 20 |
// Max-width is slightly more than the W3 since our docs often have images. |
| 21 |
// We shoot for about 100 characters per line instead of 80. |
| 22 |
// ref: https://www.w3.org/WAI/tutorials/page-structure/styling/#line-length |
| 23 |
width: 100%; |
| 24 |
max-width: 60em; |
| 25 |
overflow-x: auto; // Prevent wide content from pushing off the secondary sidebar |
| 26 |
padding: 1rem; |
| 27 |
|
| 28 |
.bd-article { |
| 29 |
// Give a bit more verticle spacing on wide screens |
| 30 |
@include media-breakpoint-up($breakpoint-sidebar-secondary) { |
| 31 |
padding-top: 1.5rem; |
| 32 |
padding-left: 2rem; |
| 33 |
} |
| 34 |
|
| 35 |
// If the user clicks a TOC link or opens a URL that goes directly to a |
| 36 |
// section of the article, then highlight the heading for that section. |
| 37 |
// The rule is written this way because Sphinx puts ids on sections |
| 38 |
// rather than headings. |
| 39 |
:target > :is(h1, h2, h3, h4, h5, h5) { |
| 40 |
background-color: var(--pst-color-target); |
| 41 |
} |
| 42 |
|
| 43 |
// If an inline element has padding, then it can take up more height |
| 44 |
// than its parent. This becomes really apparent when highlighting the |
| 45 |
// parent element, i.e., setting its background color to |
| 46 |
// `var(--pst-color-target)`. In that case, the inline element extends |
| 47 |
// outside the highlighted area and it looks bad. |
| 48 |
:is(h1, h2, h3, h4, h5, h6) > code { |
| 49 |
display: inline-block; |
| 50 |
} |
| 51 |
} |
| 52 |
} |
| 53 |
} |
| 54 |
} |