griffel icon indicating copy to clipboard operation
griffel copied to clipboard

core: `makeStaticStyles` to support @at-rules

Open jligeza opened this issue 1 year ago • 3 comments
trafficstars

This code:

export default makeStyles({
  ':root': {
    backgroundColor: 'red',
    '@media screen': {
      color: 'blue',
    }
  }
});

Produces this:

.f3xbvq9 {
  background-color: red;
}

@media screen {
  .f16lhzc5 {
    color: blue;
  }
}

While this code:

export default makeStaticStyles({
  ':root': {
    backgroundColor: 'red',
    '@media screen': {
      color: 'blue',
    }
  }
});

Produces this (missing media query):

:root {
  background-color: red;
}

Other functions such as @supports also don't work. It is not mentioned in documentation that media query is not supported, but even if it isn't, I think it should, as it is rather important.

jligeza avatar Apr 16 '24 06:04 jligeza

Indeed, good catch 👍 Would be nice to support it.

layershifter avatar Apr 16 '24 14:04 layershifter

@layershifter any plans to implement that? :)

FelixWiecz avatar Sep 18 '24 13:09 FelixWiecz

@layershifter any plans to implement that? :)

@FelixWiecz we don't have plans on it currently :(

layershifter avatar Sep 23 '24 08:09 layershifter