Should be a simple question but I've never seen a clear answer to this.
I know that capacitors remove DC bias on a signal, like with an AC signal being output from an amplifier; just couple the signal through an HPF and you're left with the AC signal oscillating around 0 V.
Does the same principle apply to two grounds that might have some DC offset? I know that a real capacitor will have some leakage current, but if we ignore that for a moment, conceptually does the capacitor remove DC offset between two grounds?
I ask because in a power supply I know that the isolated side and input side are sometimes bridged with a cap. If we assume for the moment that the output side is floating, wouldn't connecting the two sides with a capacitor set them to the same potential? Or does this just remove any DC offset for HF noise, so now the HF noise is oscillating around 0 V with respect to some other reference (like earth???)?