Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

OK, after research (and with help by Gemini because my English is not so good), I managed to solve this with:

    themes: ['one-light', 'one-dark-pro'],
    useDarkModeMediaQuery: false,
    themeCssSelector: (theme, { styleVariants }) => {
      // 2. If the theme is 'one-dark-pro', trigger it when .dark class is on <html>
      if (theme.name === 'one-dark-pro') return '.dark';
      // Otherwise, it's the default theme (one-light)
      return false;
    },

And the crucial concepts are:

  1. The first theme is the default theme. The order absolutely matters.
  2. useDarkModeMediaQuery must be disabled in order not to let EC respond to @media query (This is the very first time to implement light…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@delucis
Comment options

@AoSankaku
Comment options

@delucis
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hippotastic
Comment options

Answer selected by hippotastic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants