// Mixins //------------------------------- @mixin box-model($model: border-box) { -moz-box-sizing : $model; -webkit-box-sizing : $model; box-sizing : $model; } @mixin antialiasing( $type:antialiased ) { -webkit-font-smoothing: $type; font-smoothing: $type; font-smooth: always; } // Variables //------------------------------- $orange: #F75838; $brown: #4E3535; $white: #F9F9D3; $background: #EDEAE7; $phone: $orange; $phone-border: $brown; $phone-screen: $white; // Here we go //------------------------------- *, *:after, *:before { @include box-model; @include antialiasing; } *:after, *:before { position: absolute; display: block; content: " "; } body { background-color: $background; } .phone { position: relative; margin: 25px auto; width: 200px; height: 350px; border: 6px solid $phone-border; background-color: $phone; border-radius: 25px; padding: 50px 17.5px; &:before { width: 25px; height: 10px; right: 25px; top: -10px; background-color: $phone-border; } &:after { top: 0; left: 0; width: 20px; height: 100%; border: 4px solid $phone-screen; border-right: 0; border-radius: 25px 0 0 25px; overflow: hidden; } .speaker { position: absolute; width: 40px; height: 5px; border-radius: 30px; background-color: $phone-border; margin-left: -12.5px; top: 22.5px; left: 50%; &:before { width: 5px; height: 5px; border-radius: 5px; background-color: $phone-border; left: -15px; } } .homebtn { position: absolute; width: 25px; height: 25px; margin-left: -12.5px; border-radius: 30px; background-color: $phone-border; bottom: 13px; left: 50%; &:after { margin: 10%; width: 40%; height: 77.5%; border: 4px solid $phone-screen; border-right: 0; border-radius: 30px 0 0 30px; overflow: hidden; } } .screen { background-color: $phone-screen; border: 4px solid $phone-border; width: 100%; height: 100%; .face { margin: 75px 20px; .eye { position: relative; $eye-size: 20px; width: $eye-size; height: $eye-size; border-radius: $eye-size; margin: 15px 15px 0 15px; display: inline-block; background-color: $phone-border; &:after { margin: 20%; width: 55%; height: 55%; border-left: 2px solid $phone-screen; border-right: 0; border-radius: 10px; overflow: hidden; transform: rotate(45deg); } } .second { &:after { transform: rotate(135deg); } } .mouth { $mouth-size: 25px; margin: 0 auto; background-color: $phone-border; border-radius: $mouth-size; width: $mouth-size; height: $mouth-size; } } } } // Pen Info (ignore) //----------------- label { background-color: rgba(255,255,255,1); color: #000; padding: 10px 15px; font-size: 18px; font-weight: bold; display: inline-block; position: absolute; top: 10px; left: 10px; box-shadow: 4px 3px 0px rgba(0,0,0,0.15); cursor: pointer; &:hover { background-color: rgba(255,255,255,0.75); ~h1{ display: block; } } } input { display: none; &:checked { ~h1 { display: block; } ~label { background-color: rgba(255,255,255,0.75); } } } h1 { display: none; font-family: Rockwell, "Courier Bold", Courier, Georgia, Times, "Times New Roman", serif; font-size: 18px; color: #000; background-color: #fff; padding: 10px; position: absolute; left: 55px; top: 10px; box-shadow: 4px 3px 0px rgba(0,0,0,0.15); z-index: 999; &:hover { display: block; } a, a:visited, a:hover { color: #000; } }