Last active
January 14, 2019 14:26
-
-
Save gastonambrogi/80cb6bda204f6dfddb78ba7543834b8b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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) | |
// ---- | |
//Variables | |
$breakpoints: ( | |
tablet: 768px, | |
desktop: 1024px | |
); | |
$spacings: ( | |
sm: 8px, | |
md: 16px, | |
lg: 24px, | |
xl: 32px | |
); | |
$colors: ( | |
black: #000, | |
gray-1: #222, | |
gray-2: #444, | |
gray-3: #666, | |
gray-4: #888, | |
gray-5: #AAA, | |
white: #FFF | |
); | |
// MQ | |
@mixin from($breakpoint) { | |
@media(min-width: map-get($breakpoints, $breakpoint)){ | |
@content; | |
} | |
} | |
// Shadows | |
@mixin static-shadow-1() { | |
box-shadow: 0 0 10px rgba(map-get($colors, black), .2); | |
} | |
@mixin static-shadow-2() { | |
box-shadow: 0 0 15px rgba(map-get($colors, black), .3); | |
} | |
@mixin hover-shadow-1() { | |
&:hover { | |
@include static-shadow-1(); | |
} | |
} | |
@mixin hover-shadow-2() { | |
&:hover { | |
@include static-shadow-2(); | |
} | |
} | |
// Border | |
@mixin border($width, $color, $type: solid, $radius: 0){ | |
border: #{$width} $type #{$color}; | |
@if ($radius > 0) { | |
-webkit-border-radius: $radius; | |
-moz-border-radius: $radius; | |
-ms-border-radius: $radius; | |
border-radius: $radius; | |
} | |
} | |
// Margin's/Padding's | |
@mixin spacing($property, $value, $side: 'all') { | |
@if($side == 'all'){ | |
#{$property}: $value; | |
} | |
@else{ | |
@if($side == 'x'){ | |
#{$property}: 0 $value; | |
} | |
@else{ | |
@if($side == 'y'){ | |
#{$property}: $value 0; | |
} | |
@else{ | |
#{$property}-#{$side}: $value; | |
} | |
} | |
} | |
} | |
// Extras | |
@mixin full-width() { | |
width: 100%; | |
max-width: none; | |
} | |
@mixin triangle($side: 'top') { /* https://engageinteractive.co.uk/blog/top-10-scss-mixins#csstriangles */} | |
.le-grill{ | |
$columns: 12; | |
$cell-size: 100%/$columns; | |
@mixin cols($colSuffix:''){ | |
@for $i from 1 through $columns { | |
.col#{$colSuffix}-#{$i} { | |
width: $cell-size * $i; | |
} | |
} | |
} | |
@include cols('-sm'); | |
@include from('tablet') { @include cols('-md'); } | |
@include from('desktop') { @include cols('-lg'); } | |
} | |
.card{ | |
@include spacing('padding', map-get($spacings, "md")); | |
@include full-width(); | |
@include from('tablet') { | |
width: 200px; | |
height: 200px; | |
@include border(1px, map-get($colors, black), $radius: 50%); | |
@include hover-shadow-1(); | |
} | |
} |
This file contains hidden or 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
.le-grill .col-sm-1 { | |
width: 8.3333333333%; | |
} | |
.le-grill .col-sm-2 { | |
width: 16.6666666667%; | |
} | |
.le-grill .col-sm-3 { | |
width: 25%; | |
} | |
.le-grill .col-sm-4 { | |
width: 33.3333333333%; | |
} | |
.le-grill .col-sm-5 { | |
width: 41.6666666667%; | |
} | |
.le-grill .col-sm-6 { | |
width: 50%; | |
} | |
.le-grill .col-sm-7 { | |
width: 58.3333333333%; | |
} | |
.le-grill .col-sm-8 { | |
width: 66.6666666667%; | |
} | |
.le-grill .col-sm-9 { | |
width: 75%; | |
} | |
.le-grill .col-sm-10 { | |
width: 83.3333333333%; | |
} | |
.le-grill .col-sm-11 { | |
width: 91.6666666667%; | |
} | |
.le-grill .col-sm-12 { | |
width: 100%; | |
} | |
@media (min-width: 768px) { | |
.le-grill .col-md-1 { | |
width: 8.3333333333%; | |
} | |
.le-grill .col-md-2 { | |
width: 16.6666666667%; | |
} | |
.le-grill .col-md-3 { | |
width: 25%; | |
} | |
.le-grill .col-md-4 { | |
width: 33.3333333333%; | |
} | |
.le-grill .col-md-5 { | |
width: 41.6666666667%; | |
} | |
.le-grill .col-md-6 { | |
width: 50%; | |
} | |
.le-grill .col-md-7 { | |
width: 58.3333333333%; | |
} | |
.le-grill .col-md-8 { | |
width: 66.6666666667%; | |
} | |
.le-grill .col-md-9 { | |
width: 75%; | |
} | |
.le-grill .col-md-10 { | |
width: 83.3333333333%; | |
} | |
.le-grill .col-md-11 { | |
width: 91.6666666667%; | |
} | |
.le-grill .col-md-12 { | |
width: 100%; | |
} | |
} | |
@media (min-width: 1024px) { | |
.le-grill .col-lg-1 { | |
width: 8.3333333333%; | |
} | |
.le-grill .col-lg-2 { | |
width: 16.6666666667%; | |
} | |
.le-grill .col-lg-3 { | |
width: 25%; | |
} | |
.le-grill .col-lg-4 { | |
width: 33.3333333333%; | |
} | |
.le-grill .col-lg-5 { | |
width: 41.6666666667%; | |
} | |
.le-grill .col-lg-6 { | |
width: 50%; | |
} | |
.le-grill .col-lg-7 { | |
width: 58.3333333333%; | |
} | |
.le-grill .col-lg-8 { | |
width: 66.6666666667%; | |
} | |
.le-grill .col-lg-9 { | |
width: 75%; | |
} | |
.le-grill .col-lg-10 { | |
width: 83.3333333333%; | |
} | |
.le-grill .col-lg-11 { | |
width: 91.6666666667%; | |
} | |
.le-grill .col-lg-12 { | |
width: 100%; | |
} | |
} | |
.card { | |
padding: 16px; | |
width: 100%; | |
max-width: none; | |
} | |
@media (min-width: 768px) { | |
.card { | |
width: 200px; | |
height: 200px; | |
border: 1px solid #000; | |
-webkit-border-radius: 50%; | |
-moz-border-radius: 50%; | |
-ms-border-radius: 50%; | |
border-radius: 50%; | |
} | |
.card:hover { | |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment