3 ms·
> There was a reason we stopped using inline styles... A few things happened between the 2000's and today tho. Practices evolve along with tools and technologi
by ggregoire 6y ago
> There was a reason we stopped using inline styles...
A few things happened between the 2000's and today tho. Practices evolve along with tools and technologies.
We started styling our React components with CSS years ago at my job and we have been keeping doing so until today. While it works (if everybody on your team agrees to follow the same methodology and conventions, which is hard to enforce), it provides 0 benefits for us. We just went this way because it has always been the way to go while developing web stuff with Java, PHP, Django and friends. Separating the style from the structure while composing presentational components (Text, Box, etc) in a page doesn't actually make much sense and CSS maintenance, class naming and conflicts prevention is a real burden. I've been following the "CSS-in-JS" solutions (which have been developed to solve these exact issues) during the last years and it seems like they could help us focusing on what actually matters.