Well the title says it all but here is some code so you see what i mean.
function eachFeature(feature, layer) { layer.on({ mouseover: highlight
If you use SVG, then you can get container as this._container and update it class.
this._container
If you use Canvas, then there are will be problems, because canvas drowning don't support DOM styles and drawing with content.
So you can't use styles with different implementations and better use styles.