Welcome to my world

The way calibre handles this is it "flattens" the css. i.e. it computes the style applying to every element. Once that's done, it's relatively easy to reset the computed values to some defaults.
Of course, I doubt this approach is suitable for Sigil since you don't want to mess with the user specified CSS structure. But perhaps if the user asks you to do this, you can warn them that it will involve flattening the css and then do it.