Skip to content

Instantly share code, notes, and snippets.

@fitzhaile fitzhaile/*.scss
Created Sep 26, 2012

Embed
What would you like to do?
SASS: Quotes Mixin
// 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
You can’t perform that action at this time.