Skip to content

Descendant combinator in griffel styles #524

Answered by layershifter
Cam-Bloom asked this question in Q&A
Discussion options

You must be logged in to vote

@Cam-Bloom you can do following ⬇️

global

makeStyles({
  global: {
    ':global(.item)': {
      color: 'red',
    },
  },
});
.item .fauc13k {
  color: red;
}

nested

makeStyles({
  global: {
    '& .item': {
      color: 'red',
    },
  },
});
.fn4exxb .item {
  color: red;
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by khmakoto
Comment options

You must be logged in to vote
2 replies
@layershifter
Comment options

@Cam-Bloom
Comment options

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