Skip to content

fix(#474): style the scrollbar for Firefox too - #491

Open
jarik2014 wants to merge 2 commits into
SmartDropLabs:mainfrom
jarik2014:fix/474-scrollbar
Open

jarik2014 wants to merge 2 commits into
SmartDropLabs:mainfrom
jarik2014:fix/474-scrollbar

Conversation

@jarik2014

Copy link
Copy Markdown

Closes #474

What changes

src/app/globals.css styles the scrollbar with ::-webkit-scrollbar and friends. Chromium honours those; Firefox ignores them entirely, so the app has a themed scrollbar in Chrome and the platform default in Firefox. The issue points at the right block.

Firefox needs the standard properties, and they are inherited, so one declaration on the root covers the document:

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

thin is the closest match to the 10px the webkit block sets. Firefox has no hover state for the thumb, so --scrollbar-thumb-hover stays a Chromium-only refinement rather than something the two engines can share — worth knowing before someone reports the hover effect as missing on Firefox.

The four values moved into custom properties, because both syntaxes need the same colours and hard-coding #2a2f2d twice is exactly how they drift apart. That is this issue's failure mode — one engine styled, the other forgotten — so removing the duplication seemed worth the three extra lines. --scrollbar-thumb matches app.border's dark value in src/lib/theme.ts; if you would rather have one source of truth, the CSS variable could read from the theme instead of restating the hex, but I did not want to restructure the theme in a scrollbar fix.

Verification

Compiled the stylesheet with the project's own postcss pipeline (@tailwindcss/postcss, the plugin the build uses) and read the output rather than the source:

scrollbar-width: thin
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track)
--scrollbar-thumb: #2a2f2d
--scrollbar-thumb-hover: #3a413e
--scrollbar-track: transparent
--scrollbar-size: 10px
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 999px }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover) }

All four webkit rules survive the move to variables, so the change is purely additive: nothing about the Chromium rendering changes, and the Firefox path now exists.

next build could not be used as the check — it fails on a webpack error that originates in src/hooks/useLockFlow.ts, a file this PR does not touch (git diff origin/main -- src/hooks/useLockFlow.ts is empty). Worth its own issue, since it means the app cannot be built from a clean checkout of main; happy to dig in if you want, but I did not want to bundle it here.

One thing I did not do: there is no automated check that Firefox picks these up, because there is no Firefox in this repo's test setup. If the visual-regression suite ever runs a second project, scrollbar-width/scrollbar-color could be asserted there; a unit test would only be asserting my own string.

`src/app/globals.css` styles the scrollbar with `::-webkit-scrollbar` and friends,
which Chromium honours and Firefox ignores completely — so the app has a themed
scrollbar in Chrome and the platform default in Firefox. The issue points at the
right block: lines 23-38.

Firefox needs the standard properties, and they are inherited, so one declaration
on the root covers the document:

  html {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }

`thin` is the closest match to the 10px the webkit block sets. Firefox has no hover
state for the thumb, so `--scrollbar-thumb-hover` stays a Chromium-only refinement
rather than something the two engines can share.

The four values moved into custom properties because both syntaxes need the same
colours, and hard-coding `#2a2f2d` twice is how they drift apart — which is this
issue's failure mode, one engine styled and the other not. `--scrollbar-thumb`
matches `app.border`'s dark value in `src/lib/theme.ts`.

Verified by compiling the stylesheet with the project's own postcss pipeline
(`@tailwindcss/postcss`, the plugin the build uses) and reading the output instead
of the source:

  scrollbar-width: thin
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track)
  --scrollbar-thumb: #2a2f2d
  --scrollbar-thumb-hover: #3a413e
  --scrollbar-track: transparent
  --scrollbar-size: 10px
  ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); ... }

All four webkit rules survive the move to variables, so the change is purely
additive and nothing about the Chromium rendering changes.

`next build` could not be used as the check: it fails with a webpack error that
originates in `src/hooks/useLockFlow.ts`, a file this commit does not touch
(`git diff origin/main -- src/hooks/useLockFlow.ts` is empty), so the failure is
not from this change. Worth looking at separately — it means the app cannot be
built from a clean checkout of main.
@netlify

netlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for spiffy-melomakarona-eb1e8a ready!

Name Link
🔨 Latest commit d214be3
🔍 Latest deploy log https://app.netlify.com/projects/spiffy-melomakarona-eb1e8a/deploys/6ab549e085d4b700084d628a
😎 Deploy Preview https://deploy-preview-491--spiffy-melomakarona-eb1e8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for smart-drop failed.

Name Link
🔨 Latest commit d214be3
🔍 Latest deploy log https://app.netlify.com/projects/smart-drop/deploys/6ab549e0081c670008a93c4c

@jarik2014

Copy link
Copy Markdown
Author

Added one more commit: a lockfile sync that is not about this PR's own subject, but is the reason every Netlify check on this PR was red.

package.json has carried next-intl: ^4.14.6 while pnpm-lock.yaml never got it. Netlify installs with --frozen-lockfile, so the install fails before the build is reached:

ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because
pnpm-lock.yaml is not up to date with <ROOT>/package.json
    Failure reason: specifiers in the lockfile (...) don't match specs in package.json (...)
    the only difference is next-intl

That is why the six checks on this PR ("Header rules", "Pages changed", "Redirect rules" — the two deploy previews each report three) were failing: they report the preview failing to build, and the preview cannot build while the install is refused. It is repo-wide, not specific to this branch.

The commit adds next-intl and its dependency tree to the lockfile and nothing else — pnpm install --no-frozen-lockfile reports no specifier changes for existing packages, the 439 added lines are all entries the package needs (icu-minify, intl-messageformat, negotiator, po-parser, the SWC extractor plugin). Verified after the change:

$ pnpm install --frozen-lockfile
Already up to date          # the exact command that used to abort

$ pnpm build
…compiled successfully, full route table printed, middleware 34 kB

The dependency is real, not stale: src/i18n.ts and src/request.ts both import { getRequestConfig } from "next-intl/server".

This commit is also on the other three open PRs from the same base (#490, #491, #493) so their previews can go green independently of this one merging.

@jarik2014

Copy link
Copy Markdown
Author

Update on the checks, since they now tell a clearer story: #492 is fully green (both deploy previews, header/redirect rules), and this one is still red — but not for the reason it was.

This branch carries the lockfile sync, so the install no longer aborts. What is left is the defects that live on main itself — the missing useEffect import in Navbar.tsx, the duplicated stepRef, the SkeletonBar prop type, the locale guard cast. They are not introduced by this PR; they are why every deploy preview in this repository fails, including this one's. #492 removes all four, which is why #492 builds.

I am deliberately not copying those fixes here: they would duplicate #492, and when it merges this branch picks them up on rebase. If you would rather each PR stand alone and be green today, say so and I will cherry-pick them in.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[enhancement] scrollbar styling only targets webkit - no Firefox support

1 participant