* {
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}
body {
background: #fff;
font-size: 100%;
}
.wrapper {
background: rgba(108,95,206,1);
background: linear-gradient(135deg, rgba(108,95,206,1) 0%, rgba(108,95,206,1) 15%, rgba(98,179,208,1) 100%);
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.display-clip {
background: #fff;
position: relative;
top: -3.6em;
height: 23.7em;
width: 13.5em;
transform-origin: top;
overflow: hidden;
}
.fab-wrap {
z-index: 3;
position: relative;
top: 19.8em;
transform-origin: bottom;
overflow: hidden;
transition: 1s;
width: 13.5em;
height: 4em;
will-change: transform;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.header {
z-index: 1;
position: relative;
width: 13.5em;
top: 2.4em;
transform-origin: top;
height: 6em;
background: #0D47A1;
box-shadow: 0 2px 4px rgba(0,0,0,0.12), 0 1.5px 3px rgba(0,0,0,0.24);
}
.fab {
z-index: 3;
width: 3em;
height: 3em;
background: #D32F2F;
border-radius: 100%;
float: right;
position: relative;
bottom: -0.25em;
right: 0.5em;
cursor: pointer;
transition: 0.8s;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
will-change: transform;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.share {
color: #fff;
font-size: 1.2em;
opacity: 1;
transition: 0.2s;
transition-delay: 0.6s;
}
.share.fadeout {
opacity: 0;
transform: scale(0,0);
transition-delay: 0s
}
.fab.scale {
transform: translate(-4.2em, 1em) scale(20,20);
background: #fff;
}
.fab-wrap.scale {
transform: scale(1,2);
}
.dim {
z-index: 2;
height: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
opacity: 0;
background: rgba(0, 0, 0, 0.4);
transition: opacity 0.5s ease;
}
.dim.shown {
opacity: 1;
height:100%;
}
.social {
z-index: 4;
position: relative;
top: 7.25em;
left: 0.9em;
width: 5em;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
font-size: 2em;
transition: opacity 0.1s, transform 0.8s;
opacity: 0;
pointer-events: none;
transition-delay: 0s;
will-change: transform;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.social.slide {
transform: translateY(-1em);
opacity: 1;
transition: 0.8s;
transition-delay: 0.2s
}
.social i {
width: 1em;
margin: 0.32em;
display: flex;
justify-content: center;
align-items: center;
}
.plus {
color: #B71C1C;
}
.twitter {
color: #2196F3
}
.facebook {
color: #0D47A1;
}
.pocket {
color: #EF3E56;
}
.email {
color: #F89A1E;
}
.link {
color: #4D4D4D;
}
.container {
position: relative;
height: 28.5em;
width: 13.5em;
border-radius: 2em;
border: 0.5em solid #181818;
}
.top-bezel, .bottom-bezel {
position: absolute;
width: 13.5em;
height: 2.4em;
border-radius: 1em 1em 0 0;
background: #181818;
}
.bottom-bezel {
bottom: 0;
border-radius: 0 0 1em 1em;
}
.camera {
position: absolute;
top: 0.55em;
left: 2em;
width: 0.2em;
height: 0.2em;
background: #000;
border-radius: 100%;
border: 0.25em solid #2e2e2e
}
.speaker-grill {
position: relative;
top: 0.6em;
left: 4em;
width: 5em;
height: 0.2em;
border: 0.2em solid #0D0D0D;
border-radius: 5em;
background: #272727;
}
.bottom-bezel .speaker-grill {
top: 1.3em;
}
@media screen and (min-width: 60em) {
body {
font-size: 105%
}
}
@media screen and (min-width: 75em) {
body {
font-size: 110%
}
}
@media screen and (min-width: 100em) {
body {
font-size: 130%
}
}
@media screen and (min-width: 125em) {
body {
font-size: 160%
}
}
@media screen and (min-width: 150em) {
body {
font-size: 200%
}
}
@media screen and (min-width: 175em) {
body {
font-size: 250%
}
}
@media screen and (min-width: 200em) {
body {
font-size: 300%
}
}
View Compiled
$(document).on 'click', '.fab', ->
$('.fab, .fab-wrap').toggleClass 'scale'
$('.dim').toggleClass 'shown'
$('.share').toggleClass 'fadeout'
$('.social').toggleClass 'slide'
View Compiled