[3.0] Line the breadcrumb up with the content it sits above - #9574
Open
albertlast wants to merge 1 commit into
Open
[3.0] Line the breadcrumb up with the content it sits above#9574albertlast wants to merge 1 commit into
albertlast wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The breadcrumb does not line up with the content it sits above, on any page.
.navigate_sectioncarried amargin-inlineof its own — 10px — while#main_content_sectionpads everything else by 12px. The breadcrumb is a sibling ofthat 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.phpandMessageIndex.template.phpdraw a second one inside the main container, where it picksup 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:
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:
Issues References (Fixes|Related|Closes)
Found while testing #7933; unrelated to that PR.