Skip to content

Instantly share code, notes, and snippets.

@tylerFowler
Created August 19, 2015 05:11
Show Gist options
  • Save tylerFowler/c360b0c04cf48186ef8d to your computer and use it in GitHub Desktop.
Save tylerFowler/c360b0c04cf48186ef8d to your computer and use it in GitHub Desktop.
A handy list of sass mixins
.hidden { display: none; } // won't take up DOM space
.hide { opacity: 0; } // will take up DOM space
/// On Chrome an input click will outline the element in blue, turn this off
@mixin disable-focus-outline {
&:focus { outline: none; }
}
@mixin center-vertically {
position: relative;
top: 50%;
@include transform(translateY(-50%));
}
@mixin firefox-only {
@-moz-document url-prefix() { @content; }
}
@mixin blended-text($color) {
background-color: $color;
color: darken($color, 60%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment