Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a better way to get consistent measurements without having to remember class names:

Use withStyles[1] and have a spacings namespace in your theme. Use the spacing in your component like spacing.button, which applies an Object containing the correct CSS padding, or spacing.padding.medium for the raw number.

[1] https://github.com/airbnb/react-with-styles



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: