Skip to content

Instantly share code, notes, and snippets.

@simplesessions
Created September 25, 2012 21:36
Show Gist options
  • Save simplesessions/3784609 to your computer and use it in GitHub Desktop.
Save simplesessions/3784609 to your computer and use it in GitHub Desktop.
Recreating the SIRI icon with no images or javascript. Four HTML elements have been used so far and the CSS is very messy. I hope to clean this up in the future. This will be an on-going build.
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Source+Code+Pro:200,300" media="screen">
<div id="siri">
<div id="spin"></div>
<a id="icon">
<span class="highlights"></span>
</a>
</div>
@import "compass"
* { padding: 0px; margin: 0; }
html { height: 100%; background: #111; }
#siri {
display: block;
position: relative;
width: 140px;
height: 140px;
border-radius: 100%;
margin: 60px auto;
overflow: hidden;
box-shadow: 0 0 0 5px rgba(200, 200, 200, 1);
&:after {
content: '';
display: block;
position: absolute;
height: 130px;
width: 130px;
border-radius: 100%;
left: 5px;
top: 5px;
background: #c8c8c8;
}
}
#spin {
display: block;
overflow: hidden;
position: absolute;
z-index: 0;
margin: 0 auto;
top: 0;
left: 0;
height: 140px;
width: 140px;
border-radius: 100%;
@include background(
linear-gradient(150deg, #E288E7 20%, transparent 60%),
linear-gradient(45deg, white 60%, transparent 60%)
);
@include animation(rotation 5s infinite);
}
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(0deg);
-webkit-animation-timing-function: linear;
}
to {
-webkit-transform: rotate(360deg);
}
}
#home {
&:after {
height: 270px;
width: 270px;
border-radius: 100%;
left: 4px;
top: 4px;
box-shadow: 0 2px 5px 4px rgba(0, 0, 0, 0.2);
@include background(
radial-gradient(23% 79%, 7% 7%, #222 50%, #1e1e1e 95%, rgba(0, 0, 0, 0.1) 90%, transparent 100%),
radial-gradient(30% 40%, #282828 20%, #222 60%)
);
}
}
.highlights {
height: 66px;
width: 32px;
display: block;
left: 3px;
top: 3px;
@include border-radius(20px);
background-image:-webkit-gradient(linear, 68% 37%, 64% 36%, from(transparent), to(rgba(255,255,255,0.4)));
}
#icon {
height: 66px;
width: 32px;
@include border-radius(20px);
display: block;
top: 16%;
margin: 0 auto;
z-index: 1;
position: relative;
font-family: 'Source Code Pro', sans-serif;
background-size: 5px 10px;
box-shadow:
0 0 0 1px rgba(255, 255, 255, 0.1),
0 0 0 2px #312042,
0 0 0 3px #000;
@include background(
radial-gradient(circle, #491d55 0px, transparent 4px),
radial-gradient(circle, #491d55 0px, transparent 4px) 3px 5px,
#291352
);
}
#icon {
&:hover {
@include background(
radial-gradient(circle, rgba(255,208,255, 0.8) 2px, transparent 4px),
radial-gradient(circle, rgba(255,208,255, 0.8) 2px, transparent 4px) 5px 2px,
#8046EF
);
background-size: 10px 5px;
}
&:before{
content: 'U';
display: block;
position: absolute;
font-weight: 200;
font-size: 9em;
line-height: 0.01em;
height: 146px;
margin: -30px 0 0 0;
top: 55px;
left: -27px;
background:
-webkit-gradient(linear, left top, 50% 40%, from(#101010), to(#2f2f2f), color-stop(0.6,#575757)),
#fff;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
&:after{
content: 'T';
display: block;
position: absolute;
font-weight: 300;
font-size: 9em;
line-height: 0.61em;
height: 25px;
width: 32px;
top: 76px;
left: 0px;
text-indent: -27px;
background: -webkit-gradient(linear, left top, 60% 20%, from(#1b1b1b), to(#333));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-transform: rotate(180deg);
border-top: 1px solid rgba(255, 255, 255, 0.3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment