I've got a publishing site where webparts need to look different based on which siteType they are in.
Got a 3 webpart styles (each style can be applied by simply adding a class to the top level webpart div) and a couple of different siteTypes. For example, in siteType A you want all news-webparts to have a blue style, but in siteType B you want them to have a red style.
What would be the best practice for applying the styles for the webparts?
My current plan is to have a page layout for each siteType where I run some js that style the webparts based on their ID ( the id starts with #MSOZoneCell_WebPartWPQ and ends with a number ) But that doesn't feel like a solid approach. What if the ID's change?
What is the general best practice for styling individual webparts.