Skip to content

Instantly share code, notes, and snippets.

@jasonkmccoy
Last active August 29, 2015 14:16
Show Gist options
  • Save jasonkmccoy/fab4f476c46c47bd52b5 to your computer and use it in GitHub Desktop.
Save jasonkmccoy/fab4f476c46c47bd52b5 to your computer and use it in GitHub Desktop.
@mixin transition($args) {
-webkit-transition: $args;
-moz-transition: $args;
-ms-transition: $args;
-o-transition: $args;
transition: $args;
}
a {
color: gray;
@include transition(color .3s ease);
&:hover {
color: black;
}
}
@jasonkmccoy
Copy link
Author

As with animations, transitions also make your code quite bloated which can hurt the readability. But this is also solved by using a mixin for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment