Skip to content

Instantly share code, notes, and snippets.

@qaharmdz
Created January 13, 2014 10:27
Show Gist options
  • Save qaharmdz/8397865 to your computer and use it in GitHub Desktop.
Save qaharmdz/8397865 to your computer and use it in GitHub Desktop.
/* ===============================================
Similiar to uk-width of UIkit grid
================================================= */
@prefix: uk-width;
@grid: 10;
@padding: 25px;
[class*='@{prefix}-'] {
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
}
.mixin-loop (@index) when (@index > 0) {
@i: (@grid - @index) + 1;
.@{prefix}-@{i}-@{grid} {
width: percentage(1/@grid) * @i;
padding-left: @padding;
}
.mixin-loop(@index - 1);
}
.mixin-loop(@grid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment