Skip to content

Conversation

wherewhere
Copy link
Contributor

PR Checklist

  • The changes have been tested (for bug fixes / features).
  • Docs in NexT website have been added / updated (for features).

PR Type

  • Bugfix.
  • Feature.
  • Improvement.
  • Code style update (e.g. formatting, linting).
  • Refactoring (no changes to functionality and APIs).
  • Documentation.
  • Translation.
  • Other... Please describe:

What is the new behavior?

Add supports for new CSS feature light-dark:

2025-07-28.164052.mp4

The Code Block does not add light-dark support since the highlight.js and prism does not supports it. The disqusjs ether because the origin style seems not match to the dark one in this project.

@supports (color: light-dark(red, red)) is necessary because post-css will fallback it to weird implementation, which does not support prefers-color-scheme. The lightdark.check_supports can control the @supports block.

How to use?

In NexT _config.yml:

# Light-Dark Mode
lightdark:
  enable: true
  # Add @supports (color: light-dark(red, red)) check
  check_supports: true

Copy link

This pull request contains changes to the configuration file. Please make sure the documentation in NexT website is changed or added.
Please edit relevant source files here: https://github.com/next-theme/theme-next-docs/tree/master/source/docs and create a pull request with the changes here: https://github.com/next-theme/theme-next-docs/pulls

@wherewhere wherewhere changed the title Add supports for light-dark Add supports of light-dark function Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants