Skip to content

Center preview content in docs example previews - #42852

Open
mdo wants to merge 3 commits into
v6-devfrom
docs/center-example-previews
Open

Center preview content in docs example previews#42852
mdo wants to merge 3 commits into
v6-devfrom
docs/center-example-previews

Conversation

@mdo

@mdo mdo commented Aug 20, 2026

Copy link
Copy Markdown
Member
  • Wrap example preview markup in a .bd-example-content element so the .bd-example frame can center content on both axes and apply a min-height.
  • Loose inline items (buttons, badges, links) now center in a row; block components keep their own text alignment and are centered horizontally, while .row/grid keep their negative gutters.
  • Author class values move to the content wrapper; justify-content: center centers d-flex/vstack rows, and utilities still override it.
  • Retarget the StackBlitz export to the new wrapper so exported markup and author classes stay correct.

Wrap example preview markup in a `.bd-example-content` element so the frame
can center content on both axes and apply a min-height. Loose inline items
(buttons, badges, links) center in a row, while block components keep their
own text alignment and get centered horizontally. Retarget the StackBlitz
export to the new wrapper so exported markup and author classes stay correct.
@mdo
mdo requested review from a team as code owners August 20, 2026 00:49
mdo added 2 commits August 19, 2026 21:06
Put justify-content before text-align and use a single :not().
Add `align-items: center` to `.bd-example-content` so examples that turn the
wrapper into a flexbox (`d-flex`, `vstack`, `hstack`) center their items
horizontally, instead of sitting left in the tall min-height frame. Exclude
grid wrappers so grid items keep stretching to equal heights.
@mdo mdo added this to v6.0.0 Aug 21, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant