When dynamically creating HTML elements with Javascript is it better to have the css predfined in a file, or dynamically assign the css?

So pretty what the title says.
Is it better performance/a more efficient use of memory to have the css be created with the dynamically generated HTML elements, or to have the classes predefined in a css file waiting to be called up?

I could imagine that having css sitting waiting to be used could make the css file unnecessarily big, whereas using JS to create the css could be a less efficient use of memory and proccesing power.

Would love to hear others thoughts on it 🙂

thanks,
-Boogabooga