DEV Community

Discussion on: What CSS methodology should we use at dev.to?

Collapse
 
leomeloxp profile image
Leo Melo

I've been doing a lot of React Native recently and the way you write the stylesheets for React Native recently and the "inline styles" approach has been really pleasing to write.

I'm not an expert in CSS by any measure but from the experience I have, BEM (with SCSS or stylus) and React inline styling are my preferred approaches. If you want something a little more structure than inlining styles you could have a look at styled components: styled-components.com/.

I think that between styled components and BEM it would depend on how much you'd like to change your current build system by. BEM is totally compatible with SCSS and all the goodness that comes with it. React inline styling and styled components would require you to rewrite a lot of your existing SCSS into something that is closer to JS (and update tooling accordingly) so it may be too much overhead for not enough gain.