devlint / gridlex

Just a CSS Flexbox Grid System
http://gridlex.devlint.fr
MIT License
1.38k stars 145 forks source link

push-left and push-right don't work in react #15

Closed bensampaio closed 8 years ago

bensampaio commented 8 years ago

I was experimenting with your grid system (which seems to be really cool btw) and found an issue with the attributes push-left and push-right when used in JSX syntax. According to the React docs "if you pass properties to native HTML elements that do not exist in the HTML specification, React will not render them". For that reason, I would like to know if it is possible to change the approach. Why not use a class? Or an attribute prefixed with data-? Thank you!

Source: https://facebook.github.io/react/docs/jsx-gotchas.html#custom-html-attributes

devlint commented 8 years ago

New version 2.1.1 fix that and use now data-push-left/right. Is it ok for you? Thx

bensampaio commented 8 years ago

It works, but just out of curiosity, why not use classes for this purpose? Wouldn't that be more appropriate since the purpose is styling? Thanks anyway!