Created
February 22, 2014 00:26
-
-
Save gisu/9146590 to your computer and use it in GitHub Desktop.
Put your own mixins in
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
@mixin size($size) { | |
@if length($size) == 2 { | |
$width : nth($size,1); | |
$height : nth($size,2); | |
@if unitless($width) { | |
$width: $width + 0px; | |
} | |
@if unitless($height) { | |
$height: $height + 0px; | |
} | |
height: $height; | |
width: $width; | |
} | |
@if length($size) == 1 { | |
@if unitless($size) { | |
$size: $size + 0px; | |
} | |
height: $size; | |
width: $size; | |
} | |
} | |
.welcome { | |
@include size(480 120); | |
color: $color_prim_03; | |
font-size: $font_size*4; | |
letter-spacing: 10px; | |
line-height: $font_size*14; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin-top: -50px; | |
margin-left: -240px; | |
text-align: center; | |
border: 2px solid $color_prim_03; | |
&:hover { | |
margin-top: -60px; | |
margin-left: -250px; | |
@include box-shadow(10px 10px 0 $color_prim_03); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment