//main: helpers.less .mspacing(@direction, @i: 0, @unit: px) when (@i < 85) and not (@direction ="") { .margin-@{direction}-@{i} { margin-@{direction}: unit(@i, @unit); } .mspacing(@direction, @i + 5); } .mspacing(@direction, @i: 0, @unit: px) when (@i < 85) and (@direction ="") { .margin-@{i} { margin: unit(@i, @unit); } .mspacing(@direction, @i + 5); } .neg-mspacing(@direction, @i: 5, @unit: px) when (@i < 85) and not (@direction ="") { .margin-@{direction}-neg-@{i} { margin-@{direction}: unit((@i*-1), @unit); } .neg-mspacing(@direction, @i + 5); } .neg-mspacing(@direction, @i: 5, @unit: px) when (@i < 85) and (@direction ="") { .margin-neg-@{i} { margin: unit((@i*-1), @unit); } .neg-mspacing(@direction, @i + 5); } /*=========== MARGINS ==========*/ .margin-auto { margin: auto; } /*---- Margin all around----*/ .mspacing(""); /* ---- Negative Margins ---- */ .neg-mspacing(""); /*---- Margin Top----*/ .mspacing(top); /* ---- Negative Top Margins ---- */ .neg-mspacing(top); /*---- Margin Right----*/ .mspacing(right); /* ---- Negative Right Margins ---- */ .neg-mspacing(right); /* ---- Margin Bottom---- */ .mspacing(bottom); /* ---- Negative Bottom Margins ---- */ .neg-mspacing(bottom); /* ---- Margin Left ---- */ .mspacing(left); /* ---- Negative Left Margins ---- */ .neg-mspacing(left);