From: Mark Otto Date: Tue, 16 Dec 2025 20:02:03 +0000 (-0800) Subject: Update Prose to use flexbox, reduce overhead with docs styles (#41934) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=024dc0a21795bb36033ee2bf6e4c15c0082ec7de;p=thirdparty%2Fbootstrap.git Update Prose to use flexbox, reduce overhead with docs styles (#41934) * Update Prose to use flexbox, reduce overhead with docs styles * Fix up some table styles --- diff --git a/scss/content/_prose.scss b/scss/content/_prose.scss index 40480d5e4b..9120d93832 100644 --- a/scss/content/_prose.scss +++ b/scss/content/_prose.scss @@ -3,15 +3,23 @@ @layer content { .prose { - --#{$prefix}content-font-size: 16px; - --#{$prefix}content-gap: 24px; + --#{$prefix}content-font-size: var(--#{$prefix}font-size-sm); + --#{$prefix}content-gap: 20px; --#{$prefix}heading-color: light-dark(var(--bs-gray-900), var(--bs-white)); position: relative; + display: flex; + flex-direction: column; + gap: var(--#{$prefix}content-gap); max-width: 1000px; margin-inline: auto; font-size: var(--#{$prefix}content-font-size); - line-height: var(--#{$prefix}content-gap); + line-height: 1.5; + + @media (width >= 1024px) { + --#{$prefix}content-font-size: var(--#{$prefix}font-size-md); + --#{$prefix}content-gap: 24px; + } p, ul, @@ -20,7 +28,7 @@ pre, table, blockquote { - margin-bottom: var(--#{$prefix}content-gap); + margin-block: 0; } li:not(:last-child) { @@ -44,12 +52,15 @@ h4, h5, h6 { - --bs-heading-color: var(--bs-emphasis-color); - margin-top: 0; - margin-bottom: calc(var(--#{$prefix}content-gap) / 2); + margin-bottom: calc(var(--#{$prefix}content-gap) / -2); font-weight: 500; line-height: 1.25; + + code { + font-weight: 600; + color: inherit; + } } h1, @@ -117,14 +128,15 @@ border-collapse: collapse; } - td, - th { - padding: 6px 12px; - text-align: inherit; - border: 1px solid var(--#{$prefix}border-color); + :where(table:not([class])) { + td, + th { + padding: 6px 12px; + text-align: inherit; + border: 1px solid var(--#{$prefix}border-color); + } } - dt { font-weight: 500; } diff --git a/site/src/layouts/DocsLayout.astro b/site/src/layouts/DocsLayout.astro index 2f806c5d78..edad987693 100644 --- a/site/src/layouts/DocsLayout.astro +++ b/site/src/layouts/DocsLayout.astro @@ -214,25 +214,19 @@ if (currentPageIndex < allPages.length - 1) { { frontmatter.reference && ( -
- -
+ ) } { frontmatter.utility && ( -
- -
+ ) } { frontmatter.classes && ( -
- -
+ ) } diff --git a/site/src/scss/_component-examples.scss b/site/src/scss/_component-examples.scss index d35e4e8819..67eb7f243b 100644 --- a/site/src/scss/_component-examples.scss +++ b/site/src/scss/_component-examples.scss @@ -24,7 +24,7 @@ --bd-example-padding: 1.25rem; --bd-example-inner-radius: calc(var(--bs-border-radius) - 1px); - margin: 0 ($bd-gutter-x * -.5) 1rem; + margin: 0 ($bd-gutter-x * -.5); font-size: var(--#{$prefix}font-size-sm); background-color: var(--bd-pre-bg); border: solid var(--bs-border-color); diff --git a/site/src/scss/_content.scss b/site/src/scss/_content.scss index b938762343..7c82a248a7 100644 --- a/site/src/scss/_content.scss +++ b/site/src/scss/_content.scss @@ -15,30 +15,6 @@ font-size: var(--#{$prefix}font-size-md); } - > p { - margin-bottom: 1.25rem; - } - - > h2, - > h3, - > h4 { - --bs-heading-color: var(--bs-fg); - } - - // Offset content from fixed navbar when jumping to headings - > h2:not(:first-child) { - margin-top: 3rem; - } - - > h3 { - margin-top: 2rem; - - code { - font-weight: 600; - color: inherit; - } - } - > ul li, > ol li { margin-bottom: .25rem;