Mixin to calculate ems