Skip to content

[2.x] fix: align the post scrubber track with its chevrons - #5059

Merged
imorland merged 1 commit into
flarum:2.xfrom
karl-bullock:fix/scrubber-track-alignment
Sep 15, 2026
Merged

imorland merged 1 commit into
flarum:2.xfrom
karl-bullock:fix/scrubber-track-alignment

Conversation

@karl-bullock

Copy link
Copy Markdown
Member

Spotted by Tutrix on the Flarum forum, in the rc.8 release thread. The offset below is theirs, found by eye; this PR moves the same distance in one declaration rather than three overrides.

The problem

The scrubber track sits noticeably left of the two chevron buttons that cap it, so neither the line nor the bar lines up with the icons pointing at them.

Measured on a discussion, relative to the scrubber container:

centre
chevron icons (.Scrubber-first / .Scrubber-last) 8.75px
track line and bar 3.5px

The buttons are width: auto; padding: 0, so they sit flush with the container, and their icons are considerably wider than the 1px track. .Scrubber-scrollbar only offsets itself 3px, which leaves the whole column about five pixels left of the icons.

The bar and the track line are correctly centred on each other (both at 0.5px within the scrollbar), so this is not a centring bug inside the scrubber. The assembly as a whole is in the wrong place.

The change

One value: the left margin on .Scrubber-scrollbar, from 3px to 8px.

Everything else in the scrubber is positioned inside that element, so the track line, the bar, the unread marker and the absolutely positioned .Scrubber-info all move with it. That is why this does not need the separate nudges to .Scrubber-bar, .Scrubber-before, .Scrubber-after and .Scrubber-info that the forum post suggested: those were written as overrides from a custom stylesheet, where moving the container was not available.

The resulting track centre is 8.5px, which is where the forum post's values land it as well.

Notes

  • Scrubber.less has not changed since 2024, so this is long-standing rather than an rc.8 regression. It is simply being looked at now.
  • The @phone block overrides only height and max-height, so nothing there is affected.
  • No other open PR or issue touches Scrubber.less.

@karl-bullock
karl-bullock requested a review from a team as a code owner September 13, 2026 14:35
The scrubber's track sat about five pixels left of the two chevron buttons
that cap it, so the line and the bar did not line up with the icons pointing
at them.

The buttons are flush with the container and their icons are wider than the
1px track, so the track needs a larger left margin to centre under them.
Measured on a discussion: the icons centre 8.75px from the container edge,
the track centred at 3.5px. Moving the scrollbar's left margin from 3px to
8px carries the track, the bar, the unread marker and the info block with it
in one declaration, since all four are positioned inside it.

Reported by Tutrix on the Flarum forum, who found the same offset by eye:
https://discuss.flarum.org/d/39746/25
@imorland
imorland force-pushed the fix/scrubber-track-alignment branch from 5a8f201 to 43513a3 Compare September 15, 2026 14:47
@imorland imorland added this to the 2.0-pre milestone Sep 15, 2026
@imorland
imorland merged commit f5dafa0 into flarum:2.x Sep 15, 2026
24 checks passed
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