Skip to content

New breadcrumb variable for divider spacing - #43091

Merged
mdo merged 5 commits into
twbs:mainfrom
pricop:main
Oct 21, 2026
Merged

mdo merged 5 commits into
twbs:mainfrom
pricop:main

Conversation

@pricop

@pricop pricop commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Description

This change adds a new breadcrum divider variable (--breadcrumb-divider-margin-inline) for cases when we need the breadcrumb to be flush with the content, but also control the spacing for the breadcrumb divider.

Motivation & Context

The old way was calculating the margin inline based on the divider item's padding-x and dividing it by a value (4), but if padding-x was set to 0 for the breadcrumb-item, there was no way to customize the spacing for the breadcrumb-divider without applying an utility class over the divider element itself.

Example

image

Personally, I'm in favor of utility classes to override stuff, but generally to add new functionality, not to remove (in this case to remove the margin).

I thought this might be useful, but if I missed something (e.g: we can already achieve the same result with the already existing options), or if you believe this should be handled using utility classes instead, feel free to decline de PR.

@pricop
pricop requested a review from a team as a code owner October 15, 2026 15:28
@julien-deramond julien-deramond added v6 v6, the main branch css Sass sources or compiled CSS feature New feature, or a change to how an existing one works labels Oct 15, 2026

@mdo mdo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pricop—I'm in favor of adding this. One naming change: please use --breadcrumb-divider-margin-x to match Bootstrap's other paired spacing tokens, including --menu-divider-margin-x. Once renamed, this is good to merge.

Comment thread scss/_breadcrumb.scss Outdated
Comment thread scss/_breadcrumb.scss Outdated
@pricop

pricop commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@mdo Great catch, sorry for that, I'll try to match the existing CSS var names in the future. I've applied the changes.

@pricop

pricop commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Sorry for the inclusion of the alert component changes, that was supposed to be for a new, different PR (I'll open a new one soon), so please ignore those.

@mdo mdo added this to v6.0.0 Oct 20, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Oct 20, 2026
pricop and others added 5 commits October 21, 2026 09:10
This change adds a new breadcrum divider variable for cases when we need the breadcrumb to be flush with the content, but also control the spacing for the breadcrumb divider.

The old way was calculating the margin inline based on the divider item's padding-x and dividing it by a value (4), but if padding-x was set to 0, there was no way to customize this without applying an utility class over the divider element itself.
Co-authored-by: Mark Otto <markdotto@gmail.com>
This was supposed to be for a different PR.
@mdo
mdo merged commit 487c5c3 into twbs:main Oct 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css Sass sources or compiled CSS feature New feature, or a change to how an existing one works v6 v6, the main branch

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

3 participants