这是indexloc提供的服务,不要输入任何密码
Skip to content

Dark theme not applied with JS disabled #576

@iamkroot

Description

@iamkroot

Describe the bug
Loading the blog with Javascript disabled results in light-theme rendering of the blog pages, even when prefers-color-scheme: dark is provided by the browser.

To Reproduce
Steps to reproduce the behavior:

  1. Configure browser to set prefers-color-scheme: dark when loading sites
  2. Go to https://tailwind-nextjs-starter-blog.vercel.app/
  3. Open uBlock Origin and disable JS on the site
  4. Refresh page
  5. See light theme

Expected behavior
Page should be loaded with dark theme.

Browser Info (if display / formatting issue):

  • Device: Desktop
  • Browser: Firefox
  • Version: 107.0b9

Additional context

  • The code blocks inside blog posts do get dark themes. I suspect this is just a CSS issue.
  • Toggle for dark mode obviously doesn't work, since JS is disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions