About to ramp up production on project where we are using React, and thinking about using Styled Components. I like a lot of the benefits that can come from this solution. The company I work for has the beginnings of its own design system, which was built on bootstrap. It's about a year old now. Other dev teams in the company just import the minified bootstrap css file and use it.
I think the company is slowly moving towards React though, and this project will be the first of many. So, we'd like to primarily shape the future of our design system in React now, but we'd like to have a fallback of the minified css file too. So that we don't have to maintain the old way while keeping it concurrent with our Styled Components (CSS-in-JS) way, is there any automated solution that could output a straight css file?
My understanding is that when we create classes in Styled Components, they are added to the DOM in a style tag within the head tag. I know that is an oversimplification and that it can be more dynamic than that, but perhaps it could also feed into an automated route of grabbing the content of the style tag and saving it to a location in a build process. Even if we had to use Glamorous or some other CSS-in-JS solution, I'd be open to it if it created the fallback. What's a UX team to do to support both the bourgeoning js dev world and the old-school bootstrap one?
Cheers!
Aucun commentaire:
Enregistrer un commentaire