Studying phase separation in confinement