cssinjs / styled-jss

Styled Components on top of JSS.
http://cssinjs.org/styled-jss
MIT License
217 stars 25 forks source link

Function don't work with nested rules #23

Closed lttb closed 7 years ago

lttb commented 7 years ago

Online example

It does not change color on hover:

const Button = styled('button')({
  fontSize: 12,
  '&:hover': {
    color: props => props.color
  }
})

const App = () => (
  <div>
    <Button color="red">Button</Button>
  </div>
)

This caused because styled-jss adds rules dynamically, see https://github.com/cssinjs/jss/issues/500