Skip to content

Docs: fix and expand customize/getting-started pages#42609

Merged
mdo merged 1 commit into
v6-devfrom
mdo/v6-docs-misc-fixes
Jul 14, 2026
Merged

Docs: fix and expand customize/getting-started pages#42609
mdo merged 1 commit into
v6-devfrom
mdo/v6-docs-misc-fixes

Conversation

@mdo

@mdo mdo commented Jul 1, 2026

Copy link
Copy Markdown
Member

Addresses a batch of miscellaneous docs problems across the getting-started and customize sections. Each item is scoped to a single page/section.

getting-started/css-variables

  • Dark mode section: removed it. In v6 the [data-bs-theme=dark] {…} block it matched no longer carries the root variable overrides (those now live in :root via light-dark()), so the section had nothing meaningful to show.
  • Component variables: added a real component-token override example (--bs-alert-*) and removed the stale "as of v5.2.0" / "more component usage coming in the future" wording.

getting-started/javascript

  • Removed the duplicate twbs/examples callout under the React Bootstrap bullet (the same callout already lives under "Using Bootstrap as a module").
  • Reviewed every code snippet against the current dist (named/default exports, .btn-* markup, import map) — all accurate, no changes needed.

guides/migration

  • Added a callout pointing to the skills/bootstrap-v5-v6-migration skill for folks migrating with an AI coding agent.

customize/color-modes

Documented the actual v6 color-mode mechanism, which the page was describing incorrectly (it still read like the v5.3 mixin-based approach):

  • v6 builds color modes on the native CSS light-dark() function plus color-scheme: light dark on :root.
  • Result: the page follows the visitor's system preference by default, and data-bs-theme overrides color-scheme to force a mode on <html> or any subtree. Both work together — no either/or.
  • Corrected the $color-mode-type default (it's media-query, the page claimed data), and refreshed the How it works / Enable dark mode / Building with Sass / CSS variables copy accordingly.

customize/components

  • Wrote the Theme variants section (was an @mdo-do placeholder): the --bs-theme-* token table, the .theme-* classes generated from $theme-colors, and usage/override examples.

customize/rtl

  • Required HTML: switched the diff block to a highlighted line (shiki [!code highlight]) on the changed <html> line.
  • Live demo: restored the missing border around the "Enable RTL mode" switch by wrapping the bare .bd-example in the bd-code-snippet wrapper that <Example> normally provides.

customize/optimize

  • Lean Sass: added a concrete custom-bootstrap.scss example showing how to comment out @forward entries per build.
  • Lean JavaScript: clarified what the side-effect import actually does (registers the data-attribute API) and reviewed the snippet + default-export callout for accuracy.
  • Unused CSS: replaced the "Help wanted" stub with a working PurgeCSS setup for static HTML pages (colon-aware extractor for v6's md:d-none-style classes, safelist for JS-toggled classes).

Prettier and markdownlint both pass.

Not included here (flagged for a separate decision): dropping customize/overview in favor of a "Via CSS" page, and drafting a v4→v6 migration skill.

- css-variables: drop the redundant dark mode root-variables section, note
  light-dark() resolution, add a component-token override example, remove the
  stale v5.2.0 reference
- javascript: remove the duplicate React example callout
- migration: mention the v5-to-v6 migration skill for AI coding agents
- color-modes: document the actual v6 mechanism (light-dark() + color-scheme):
  system preference by default with data-bs-theme override, and correct the
  $color-mode-type default (media-query)
- components: write the Theme variants section (--bs-theme-* tokens, .theme-*
  classes, usage examples)
- rtl: highlight the changed line in Required HTML; restore the border around
  the live demo by wrapping it in bd-code-snippet
- optimize: add a lean-Sass commented-import example, clarify the lean-JS
  side-effect import, and replace the Unused CSS stub with a working PurgeCSS
  setup for static HTML
@mdo mdo force-pushed the mdo/v6-docs-misc-fixes branch from ea97968 to 6e705e3 Compare July 13, 2026 20:02
@mdo mdo merged commit 35102ff into v6-dev Jul 14, 2026
12 checks passed
@mdo mdo deleted the mdo/v6-docs-misc-fixes branch July 14, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant