Last active
July 23, 2018 07:22
-
-
Save filipvanreeth/f5404131ace6e243ef0a6c9cca042889 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
<h1 class="u-margin-4 u-margin-2-lg">Dit is een tekst</h1> |
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.5.6) | |
// Compass (vundefined) | |
// ---- | |
$color-1: #333; | |
$color-2: #0073BD; | |
$numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; | |
$orientations: left, right, top, bottom; | |
$breakpoints: ( | |
sm: 576px, | |
md: 768px, | |
lg: 992px, | |
xl: 1200px, | |
); | |
@mixin breakpoint($breakpoint) { | |
$breakpoint: map-get($breakpoints, $breakpoint); | |
@media (min-width: $breakpoint) { | |
@content; | |
} | |
} | |
@mixin breakpoints($get-numbers: false) { | |
@content; | |
$breakpoints: map-keys($breakpoints); | |
@each $breakpoint in $breakpoints { | |
@include breakpoint($breakpoint) { | |
@if $get-numbers == true { | |
@each $number in $numbers { | |
&-#{$number}-#{$breakpoint} { | |
@content; | |
} | |
} | |
} @else { | |
&-#{$breakpoint} { | |
@content; | |
} | |
} | |
} | |
} | |
} | |
.u-margin { | |
@include breakpoints(true) { | |
content: "Test to get the $number variable"; | |
// How can I get the $number variable here? | |
//margin: $number * 1rem; | |
} | |
} | |
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
.u-margin { | |
content: "Test to get the $number variable"; | |
} | |
@media (min-width: 576px) { | |
.u-margin-0-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-1-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-2-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-3-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-4-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-5-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-6-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-7-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-8-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-9-sm { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-10-sm { | |
content: "Test to get the $number variable"; | |
} | |
} | |
@media (min-width: 768px) { | |
.u-margin-0-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-1-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-2-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-3-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-4-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-5-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-6-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-7-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-8-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-9-md { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-10-md { | |
content: "Test to get the $number variable"; | |
} | |
} | |
@media (min-width: 992px) { | |
.u-margin-0-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-1-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-2-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-3-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-4-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-5-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-6-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-7-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-8-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-9-lg { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-10-lg { | |
content: "Test to get the $number variable"; | |
} | |
} | |
@media (min-width: 1200px) { | |
.u-margin-0-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-1-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-2-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-3-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-4-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-5-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-6-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-7-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-8-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-9-xl { | |
content: "Test to get the $number variable"; | |
} | |
.u-margin-10-xl { | |
content: "Test to get the $number variable"; | |
} | |
} |
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
<h1 class="u-margin-4 u-margin-2-lg">Dit is een tekst</h1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment