axept / prejss

Get the power of PostCSS with plugins in your JSS styles. 🎨 Just put CSS into JS and get it as JSS object.
MIT License
248 stars 13 forks source link

wrong parser on float property #17

Open BrRenat opened 7 years ago

BrRenat commented 7 years ago

Maybe I do not understand something, but when i set property float float: left it transform to 'cssFloat': 'left'

DenisIzmaylov commented 7 years ago

Good point! Thank you.

It seems the problem in PostCSS:

We'll need to investigate more deeply why the latests fixes by @ai are not working for https://github.com/axept/prejss-postcss-parser while it's using pretty new version of postcss-js.

ai commented 7 years ago

postcssJs.objectify transforms float to cssFloat, because it is reserved keyword in some browsers

DenisIzmaylov commented 7 years ago

Andrey @ai, thanks for clarification. But it seems stringified keys like:

result['float'] = 'left'

Could be used without any problems. Or I'm wrong here?

ai commented 7 years ago

Hm. To understand how to fix problem, I need to know what is the real problem here.