Created
September 26, 2012 20:52
-
-
Save fitzhaile/3790515 to your computer and use it in GitHub Desktop.
SASS: Quotes Mixin
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
// Add quotes to an element. | |
// | |
// Parameters: | |
// | |
// * [optional] `size` -- Size, in em of the quotes | |
// * [optional] `padding` -- Top-left padding on lefthand quote | |
// * [optional] `left` -- Left quote glyph | |
// * [optional] `right` -- Right quote glyph | |
@mixin my-quotes($size: 1.3em, $padding:false, $left:'\201C', $right:'\201D') { | |
&:after, &:before { font-size: $size; } | |
&:after { content: $right; } | |
&:before { | |
content: $left; | |
display: inline-block; | |
position: relative; | |
@if $padding != false { | |
left: -#{$padding}; | |
top: -#{$padding}; | |
} | |
@else { | |
left: -.17em; | |
top: -.05em; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment