Skip to content

Instantly share code, notes, and snippets.

@fitzhaile
Created September 26, 2012 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitzhaile/3790515 to your computer and use it in GitHub Desktop.
Save fitzhaile/3790515 to your computer and use it in GitHub Desktop.
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