If you're using a frontend view engine like React then I'd recommend looking into component-based CSS frameworks like https://tachyons.io/ or https://tailwindcss.com/ where you have classes for the basics and add them together for the final output. It's a natural fit to view components.