Altering plotly figures within dash app via css

are there any guidelines for altering css for html/svg elements within actual plotly figures? For instance, in trying to fix the common issue with large legends overlapping scatter plots, I’ve tried altering CSS for classes like ‘infolayer’, ‘legend’, ‘main-svg’, and ‘svg-container’ but I’m not sure if this is safe to do. In many cases, doing this seems to disable legend operations like clicking on legend items to toggle on/off traces.