Skip to content

core: makeStaticStyles to support @at-rules #537

Open

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions