Skip to content

Instantly share code, notes, and snippets.

@rizqinizamil
Last active January 27, 2020 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rizqinizamil/8cf5eb4be94006cd7595 to your computer and use it in GitHub Desktop.
Save rizqinizamil/8cf5eb4be94006cd7595 to your computer and use it in GitHub Desktop.
// ----
// libsass (v3.2.5)
// ----
@import 'susy';
$susy: (
columns: 12,
column-width: 5em,
);
$gutter: gutters(static);
@mixin calc-span($span) {
$span: append($span, 'wide');
float: left;
width: calc(#{span($span)} - #{$gutter});
margin-right: $gutter;
}
.container {
@include container(show);
}
.test {
@include calc-span(3);
background: rgba(gray, .5);
}
.test2 {
@include calc-span(4);
background: rgba(gray, .5);
}
<div class="container">
<div class="test">hello</div>
<div class="test2">hello</div>
<div class="test">hello</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment