Refactored from carat. To be used in overlayed projects, i.e. margin