Skip to content

Instantly share code, notes, and snippets.

@PuddingNL
Last active April 21, 2022 14:19
Show Gist options
  • Select an option

  • Save PuddingNL/5964d3d039990b08fb26 to your computer and use it in GitHub Desktop.

Select an option

Save PuddingNL/5964d3d039990b08fb26 to your computer and use it in GitHub Desktop.
[SASS] Mixins
/*
* Author: David Walsh
* Source: http://css-tricks.com/redesigning-with-sass/
*/
@mixin vendorize($property, $value) {
-webkit-#{$property}: $value;
-moz-#{$property}: $value;
-ms-#{$property}: $value;
-o-#{$property}: $value;
#{$property}: $value;
}
@mixin clear() {
&:before, &:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
&:after {
clear: both;
}
}
@mixin linkTextOffscreen() {
text-indent: -9999px;
overflow: hidden;
text-decoration: none;
display: block;
font-size: 0;
text-align: start;
}
@mixin hoverActiveFocus($property, $value) {
&:hover, &:active, &:focus {
#{$property}: $value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment