Skip to content

Instantly share code, notes, and snippets.

@mcbrwr
Created June 2, 2014 08:42
Show Gist options
  • Save mcbrwr/888c55f0ad9e7d7f2d5f to your computer and use it in GitHub Desktop.
Save mcbrwr/888c55f0ad9e7d7f2d5f to your computer and use it in GitHub Desktop.
LESS overlay video play icon
.vidicon(@size) {
@trisize: (@size / 3);
position: relative;
z-index: 1;
&:before,
&:after {
content: "";
opacity: .7;
display: block;
position: absolute;
z-index: 2;
top: 50%;
left: 50%;
}
&:before {
border: solid @trisize transparent;
border-right: none;
border-left-color: #fff;
border-left-width: (@trisize/.8);
margin-top: -@trisize;
margin-left: -(@trisize / 2);
}
&:after {
.border-radius(100%);
border: solid 5px #fff;
width: @size;
height: @size;
margin-top: -(@size / 2);
margin-left: -(@size / 2);
}
&:hover {
&:before,
&:after {
opacity: 1;
.transition(.3s);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment