Skip to content

Instantly share code, notes, and snippets.

@DavidVotrubec
Created May 20, 2014 07:25
Show Gist options
  • Save DavidVotrubec/f24cf9465de98a213ec3 to your computer and use it in GitHub Desktop.
Save DavidVotrubec/f24cf9465de98a213ec3 to your computer and use it in GitHub Desktop.
Mixin for css transition
.transition(@property, @duration: 1s){
-webkit-transition: @property @duration;
-moz-transition: @property @duration;
-ms-transition: @property @duration;
-o-transition: @property @duration;
transition: @property @duration;
}
@DavidVotrubec
Copy link
Author

Example usage:

.my-button {
background-color:#E6C500;

    &:hover{
        .transition(background-color);
        background-color:#d1b405;
    }
}
Button

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