  We study the phase transitions of a fluid confined in a capillary slit made
from two adjacent walls each of which are a periodic composite of stripes of
two different materials. For wide slits the capillary condensation occurs at a
pressure which is described accurately by a combination of the Kelvin equation
and the Cassie law for an averaged contact angle. However, for narrow slits the
condensation occurs in two steps involving an intermediate bridging phase, with
the corresponding pressures described by two new Kelvin equations. These are
characterised by different contact angles due to interfacial pinning, with one
larger and one smaller than the Cassie angle. We determine the triple point and
predict two types of dispersion force induced Derjaguin-like corrections due to
mesoscopic volume reduction and the singular free-energy contribution from
nano-droplets and bubbles. We test these predictions using a fully microscopic
density functional model which confirms their validity even for molecularly
narrow slits. Analogous mesoscopic corrections are also predicted for two
dimensional systems arising from thermally induced interfacial wandering.
