griffel icon indicating copy to clipboard operation
griffel copied to clipboard

core: & with some selectors produces an invalid result

Open layershifter opened this issue 3 years ago • 0 comments

Comes from #178.

Griffel handles classes & pseudo classes selectors properly, for example:

 makeStyles({
  root: {
    '&.foo': { color: 'red' }
  },
});

Produces correct result ✅

.f1lw17ff.foo {
  color: red;
}

While &body:

makeStyles({
  root: {
    '&body': { color: 'red' }
  },
})

Produces a wrong result 🚨

.f115m9dlbody { /* 🤯 oops */
  color: red;
}
  • [ ] check also [data] selectors

layershifter avatar Sep 27 '22 09:09 layershifter