Mixins and functions for Bagel UI