Last active
September 21, 2020 17:31
-
-
Save krstivoja/882384284b8c97d9e053 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.xs-1 { | |
width: 25%; | |
} | |
.xs-2 { | |
width: 50%; | |
} | |
.xs-3 { | |
width: 75%; | |
} | |
.xs-4 { | |
width: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
$columns: 4; | |
$breakpoints: ( | |
small : 480px, | |
medium: 640px, | |
large : 1024px | |
); | |
$gutter: ( | |
null : 10px, | |
small : 20px, | |
medium: 30px, | |
large : 50px | |
); | |
@mixin colum-padding($fs-map, $fs-breakpoints: $breakpoints) { | |
@each $fs-breakpoint, $gutter in $fs-map { | |
@if $fs-breakpoint == null { | |
padding: $gutter; | |
} | |
@else { | |
@if map-has-key($fs-breakpoints, $fs-breakpoint) { | |
$fs-breakpoint: map-get($fs-breakpoints, $fs-breakpoint); | |
} | |
@media screen and (min-width: $fs-breakpoint) { | |
padding: $gutter; | |
} | |
} | |
} | |
} | |
@mixin col-list { | |
@for $i from 1 through $columns { | |
$width: 100% / ($columns / $i); | |
.xs-#{$i}{ | |
// @include colum-padding($gutter); | |
width: $width; | |
} | |
} | |
} | |
@include col-list; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment