Skip to content

Instantly share code, notes, and snippets.

@reidark
reidark / _margin.scss
Created May 18, 2018
Generate margin in scss
View _margin.scss
$margin-slug: 'margin-top', 'margin-right', 'margin-bottom', 'margin-left';
$margin-total: 10;
$margin-increment: 4;
@for $i from 1 through length($margin-slug) {
@for $x from 0 through $margin-total {
.#{nth($margin-slug, $i)}-#{$x} {
#{nth($margin-slug, $i)}: ($x * $margin-increment) + px !important;
}
}
View _config.yml
authors:
hanzou:
name: Hanzou Hattori
display_name: Hanzou
gravatar: c66919cb194f96c696c1da0c47354a6a
email: hanzou@company.com
web: http://company.com
twitter: company
github: hhattori
jorgen: