If you use React, you might like Rebass (https://rebassjs.org/getting-started), which turns the most common CSS attributes into component props with assorted built-in functionality for common theming and media queries, or Emotion (https://emotion.sh/docs/introduction), which lets you composably define CSS per component that automatically gets scoped to that component only. Both are designed in a way that still render efficiently, such as turning static CSS rules into statically-defined bundles and only swapping out the dynamic bits on the fly.