Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: makeStaticStyles to support @at-rules #537

Open
jligeza opened this issue Apr 16, 2024 · 1 comment
Open

core: makeStaticStyles to support @at-rules #537

jligeza opened this issue Apr 16, 2024 · 1 comment
Labels
💅 enhancement New feature or request

Comments

@jligeza
Copy link

jligeza commented Apr 16, 2024

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.

@layershifter layershifter added the 💅 enhancement New feature or request label Apr 16, 2024
@layershifter layershifter changed the title makeStaticStyles does not support media query, etc. core: makeStaticStyles to support @at-rules Apr 16, 2024
@layershifter
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💅 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants