Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@chrismoutray
Last active October 30, 2015 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismoutray/26bd1558b74158c8e0e4 to your computer and use it in GitHub Desktop.
Save chrismoutray/26bd1558b74158c8e0e4 to your computer and use it in GitHub Desktop.
less/css opacity transition examples
.wrapper {
.transition(@property: opacity, @duration: .2s, @timing: ease-in-out);
.opacity (@opacity: 1);
&.hide {
.opacity (@opacity: 0);
}
}
.wrapper {
& > * {
.transition(@property: opacity, @duration: .2s, @timing: ease-in-out);
}
.item {
.opacity (@opacity: 0);
}
&:hover {
.item {
.opacity (@opacity: 1);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment