cssinjs / aphrodite-jss

Aphrodite-like API on top of JSS.
MIT License
92 stars 17 forks source link

Unable to render media queries #4

Closed tiagojsalmeida closed 7 years ago

tiagojsalmeida commented 7 years ago

Hey guys.

I'm not sure why but I'm unable to render media queries.

Can I not render my media queries like this?

css(StyleSheet.create({
  base: {
    '@media only screen and (min-width: 1024px)': {
      width: px(20),
    }
  }
}).base)
kof commented 7 years ago

Take a look at the example, it should work ...

kof commented 7 years ago

Just tried to be sure and it turns a bug, interesting thing is that this works:

{
  base: {
    float: 'left',
    '@media only screen and (min-width: 1024px)': {
      width: px(20),
    }
  }
}
tiagojsalmeida commented 7 years ago

@kof that works because there's the float: left. From my investigation, whenever you just have media queries, they will become empty, therefore the styles will be empty which causes this bug. This occurs with one of the plugins but I didn't figure out which.

kof commented 7 years ago

Moved this issue to jss issue tracker, because its not related to this code base.