Skip to content

Color mode transition #6095

Answered by hugobqd
rikusen0335 asked this question in Q&A
May 24, 2022 · 1 comments · 10 replies
Discussion options

You must be logged in to vote

Hi!
There is no 'body' key in the theme object, it should be written in theme.styles.global like that:

const theme = extendTheme({
  styles: {
    global: {
      body: {
        transitionProperty: "all",
        transitionDuration: "normal",
      },
    },
  },
});

But note that there are already transition-property: background-color & transition-duration: var(--chakra-transition-duration-normal) by default on the body.

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@rikusen0335
Comment options

@0x33dm
Comment options

@rikusen0335
Comment options

@0x33dm
Comment options

@0x33dm
Comment options

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