Skip to content

[3.0] Line the breadcrumb up with the content it sits above - #9574

Open
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/breadcrumb-alignment
Open

[3.0] Line the breadcrumb up with the content it sits above#9574
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/breadcrumb-alignment

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

The breadcrumb does not line up with the content it sits above, on any page.

.navigate_section carried a margin-inline of its own — 10px — while
#main_content_section pads everything else by 12px. The breadcrumb is a sibling of
that container, not a child, so those two numbers are the only thing positioning it, and
they disagree. Result: the bar sits two pixels outside the boxes below it, everywhere.

The lower breadcrumb is further out still. Display.template.php and
MessageIndex.template.php draw a second one inside the main container, where it picks
up the 12px of padding and then adds its own 10px on top — leaving it ten pixels further
in
than everything above it.

Both come from the same assumption: that the breadcrumb has to indent itself. Only the
outer one does, because only it sits outside the padded container. So that is the only one
that now carries a margin, and it carries the same 12px the container uses.

Measured at 1280px wide:

before after
breadcrumb above the content 73.88 75.88
content boxes 75.88 75.88
lower breadcrumb (board, topic) 86.40 76.40

How this was checked

Every breadcrumb on seven pages — admin, moderation, calendar, board index, topic display,
statistics and the front page — now starts and ends on exactly the same pixel as the
content boxes, in both writing directions (the property is direction-aware, so
right-to-left was checked too, and matches on both edges).

Then a sweep of 18 pages and 5855 elements, before and after, comparing the computed box
properties and the full bounding rectangle of every element:

  • 333 values changed, and every one of them is a breadcrumb or something inside it
  • 0 changed anywhere else — nothing reflowed off the back of it

Issues References (Fixes|Related|Closes)

Found while testing #7933; unrelated to that PR.

The breadcrumb has never quite lined up with anything. It carried a 10px
inline margin of its own, while #main_content_section pads everything else by
12px, so the bar above the content sat two pixels outside it on every page.

The lower breadcrumb was further out still. Display and MessageIndex draw a
second one inside the main container, where it picked up that 12px of padding
and then added its own 10px on top, leaving it ten pixels further in than the
boxes above it.

Both come from the same assumption, that the breadcrumb has to indent itself.
Only the outer one does, because it is a sibling of #main_content_section
rather than a child, so that is the only one that now carries a margin, and it
carries the same 12px the container uses.

Measured on seven pages: every breadcrumb now starts and ends exactly where
the content boxes do, in both writing directions, including the lower ones on
the board index and topic display. A sweep of 18 pages and 5855 elements finds
333 changed values, and every one of them belongs to a breadcrumb or something
inside it - nothing else on any page moved.

Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@github-actions github-actions Bot added the Theme label Aug 29, 2026
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants