[ad_1]
[ad_2]
I'm working on small component parts for a WordPress theme. I've placed several small template parts under template-parts/components/
. Correspondingly, I've placed the CSS for each part under /assets/css/template-parts/components/
.
First, is it common practice in WordPress theme development to create multiple small components? (I'm approaching this with a mindset similar to React components.) Additionally, in this scenario, what would be the best practice for loading the CSS for each part as it's loaded?
Breaking your theme into small components is a good approach, and to load CSS for each part