Skip to content

Instantly share code, notes, and snippets.

@dkrnl
Last active December 15, 2015 02:44
Show Gist options
  • Select an option

  • Save dkrnl/dde5ec17c18d7d98c8cb to your computer and use it in GitHub Desktop.

Select an option

Save dkrnl/dde5ec17c18d7d98c8cb to your computer and use it in GitHub Desktop.
Bootrsap 3 gridly
.make-columns(@name; @columns; @gutter-width: @grid-gutter-width) {
@class-lg: ~".col-lg-@{name}";
> @{class-lg} {
.make-lg-column((@grid-columns / @columns); @gutter-width);
}
@class-md: ~".col-md-@{name}";
> @{class-md} {
.make-md-column((@grid-columns / @columns); @gutter-width);
}
@class-sm: ~".col-sm-@{name}";
> @{class-sm} {
.make-sm-column((@grid-columns / @columns); @gutter-width);
}
@class-xs: ~".col-xs-@{name}";
> @{class-xs} {
.make-xs-column((@grid-columns / @columns); @gutter-width);
}
}
.row {
.make-columns("tenth", 10);
.make-columns("fifth", 5);
.make-columns("quarter", 4);
.make-columns("third", 3);
.make-columns("half", 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment