Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOUC on shadcn elements with color-related transitions #110

Open
based64-eth opened this issue Feb 9, 2025 · 1 comment
Open

FOUC on shadcn elements with color-related transitions #110

based64-eth opened this issue Feb 9, 2025 · 1 comment

Comments

@based64-eth
Copy link

Describe the bug

My app is default light mode, and there is a flash of dark ui when the page first loads. Disabling background-color and color -related transition properties on affected elements solves this issue.

I have already set <ModeWatcher defaultMode="light" />

This is likely related: huntabyte/shadcn-svelte#381 (comment)

Reproduction

Follow the steps here: https://next.shadcn-svelte.com/docs/dark-mode/svelte

Logs

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900KF
    Memory: 21.17 GB / 31.26 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: 1.22.22 - ~/.yarn/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
    bun: 1.2.2 - ~/.bun/bin/bun
  npmPackages:
    @sveltejs/kit: ^2.17.1 => 2.17.1 
    mode-watcher: ^0.5.1 => 0.5.1 
    svelte: ^5.19.9 => 5.19.9

Severity

annoyance

@based64-eth
Copy link
Author

FOUC happens when mode is toggled after page load too.

disableTransitions doesnt seem to do anything.

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

No branches or pull requests

1 participant