Skip to content

Instantly share code, notes, and snippets.

@KATT
Created November 25, 2013 07:43
Show Gist options
  • Save KATT/7637777 to your computer and use it in GitHub Desktop.
Save KATT/7637777 to your computer and use it in GitHub Desktop.
A Pen by Alexander Johansson.
.dot
.outer
.inner
$orange = #d35400;
body {
height: 100%;
width: 100%;
background: #34495e;
}
* {
box-sizing: border-box;
}
centerize() {
left: 50%;
top: 50%;
margin-left: (-@width/2);
margin-top: (-@height/2);
}
.dot {
position: absolute;
left: 50%;
top: 50%;
width: 40px;
height: 40px;
margin-left: (-@width/2);
margin-top: (-@height/2);
.inner, .outer {
position: absolute;
display: block;
content: "";
border-radius: 1000px;
transition: all 0.2s ease-out;
}
.outer {
background: $orange;
width: 16px;
height: 16px;
centerize();
}
.inner {
border: 4px solid #ecf0f1;
width: 8px;
height: 8px;
centerize();
}
&:hover {
.inner {
width: 24px;
height: 24px;
border-width: 6px;
centerize();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment