We want to express those CSS rules in a .css file. This way it will be easier to change by designers since they do not need to modify JS file but simply a CSS file. Also it will be easier to see and create your own style just by extending existing CSS. Moreover programmatically applied CSS changes are not an efficient code.
I think you just want to pass colorScheme as "light" or "dark" and then a specific css classes "[light/dark]-something" is applied to required elements.