Created
January 25, 2016 07:45
-
-
Save hmbilal/1c6909bb9d4642e28a11 to your computer and use it in GitHub Desktop.
Includes clearfix, border, center-block, 3D Text,
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
// clearfix | |
@mixin clearFix() { | |
&:before, | |
&:after { | |
content: ""; | |
display: table; | |
} | |
&:after { | |
clear: both; | |
} | |
} | |
// add border for all sides or one side | |
@mixin border($width, $style, $color, $side: 'all') { | |
@if $side == 'all' { | |
border: $width $style $color !important; | |
} @else if $side == 'top' { | |
border-top: $width $style $color !important; | |
} @else if $side == 'left' { | |
border-left: $width $style $color !important; | |
} @else if $side == 'right' { | |
border-right: $width $style $color !important; | |
} @else if $side == 'bottom' { | |
border-bottom: $width $style $color !important; | |
} | |
} | |
// center a block | |
@mixin centerBlock { | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
// 3d text | |
@mixin threeDText($color) { | |
color: $color; | |
text-shadow: | |
0 2px 0 darken($color, 14%), | |
0 4px 0 darken($color, 16%), | |
0 6px 0 darken($color, 18%), | |
0 8px 0 darken($color, 20%), | |
3px 8px 15px rgba(0,0,0,0.1), | |
3px 8px 5px rgba(0,0,0,0.3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment