styled-components / polished

A lightweight toolset for writing styles in JavaScript ✨
https://polished.js.org/
MIT License
7.64k stars 208 forks source link

homepage example contains syntax error #117

Closed rattrayalex closed 7 years ago

rattrayalex commented 7 years ago

I pasted this into the console on the homepage:

const styles = {
  color: lighten(0.2, '#000'),
  font-size: modularScale(1),
  [hiDPI(1.5)]: {
    font-size: modularScale(1.25)
  }
}

And, unsurprisingly, got Uncaught SyntaxError: Unexpected token -

I assume it needs to be "font-size":?

mxstbr commented 7 years ago

Yes, good call! PR welcome.

rattrayalex commented 7 years ago

Sure, forthcoming

nikgraf commented 7 years ago

thanks @rattrayalex