Board Thread:Support Requests - Designing Your Wiki/@comment-45171933-20200510004347/@comment-44807868-20200510052304

simply allows an infobox to use a certain CSS theme. It doesn't change the scope of CSS styling itself. You may want to have a look at Help:Infoboxes/CSS to help you understand it better.

So all in all, in order to limit the infoboxes styling to  theme, you need to use   CSS selectors, too. Also, I'd highly recommend organizing the Wikia.css more neatly. The bits for customizing infobox are scattered around within the other customization bits, and also are being unnecessarily repeated at certain points. That can risk maintaining Wikia.css to be a headache.

I tried to clean up the CSS for infoboxes along with adding  selectors, so this should do the work: