Skip to content

Instantly share code, notes, and snippets.

@voodoocode
Created June 30, 2014 13:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save voodoocode/c1b2c6339fc5c65a613c to your computer and use it in GitHub Desktop.
A short mixin to insert a given character in generated content element before an element.
//include a character with before
@mixin insert-before($char: '-') {
&:before {
content: $char;
@content;
}
}
@mixin checkmark() {
@include insert-before('') {
padding-right: 5px;
color: $base-accent-color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment