Skip to content

Responsive styles on global theme #143

Answered by mattcompiles
elliotschultz asked this question in Q&A
Discussion options

You must be logged in to vote

The following should work.

globalStyle(':root', {
  vars: assignVars(vars.space, {
    small: '4px',
    medium: '8px',
    large: '16px'
  }),
  '@media': {
    'screen and (min-width: 1024px)': {
      vars: assignVars(vars.space, {
        small: '8px',
        medium: '16px',
        large: '32px'
      })
    }
  }
});

Replies: 1 comment 1 reply

Comment options

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

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