Skip to content

Instantly share code, notes, and snippets.

@gadzhimari
Last active April 8, 2016 06:18
Show Gist options
  • Save gadzhimari/260f6e7ca3a6a08ee22bbb95127a9b8e to your computer and use it in GitHub Desktop.
Save gadzhimari/260f6e7ca3a6a08ee22bbb95127a9b8e to your computer and use it in GitHub Desktop.
@mixin pseudo($width, $height, $content: '') {
position: absolute;
content: $content;
width: $width;
height: $height;
}
@mixin font($alias, $name) {
@font-face {
font-family: $alias;
src: url("../fonts/" + $name + ".woff2") format("woff2"),
url("../fonts/" + $name + ".woff") format("woff");
font-weight: normal;
font-style: normal;
}
}
@mixin centerer($horizontal: true, $vertical: true) {
position: absolute;
@if ($horizontal and $vertical) {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} @else if ($horizontal) {
left: 50%;
transform: translate(-50%, 0);
} @else if ($vertical) {
top: 50%;
transform: translate(0, -50%);
}
}
%clearfix {
&:before,
&:after {
content: '';
display: table;
}
&:after {
clear: both;
}
}
%hardware-acceleration {
transform: translate3d(0, 0, 0);
}
%nospace {
font-size: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment