Skip to content

Instantly share code, notes, and snippets.

@pmburu
Created May 23, 2020 16:51
Show Gist options
  • Save pmburu/2b34e54599c2fdc74bd54367e028c8fe to your computer and use it in GitHub Desktop.
Save pmburu/2b34e54599c2fdc74bd54367e028c8fe to your computer and use it in GitHub Desktop.
Wrong place to be - 404
<div class="o-404">
<h1 class="a-title">404</h1>
<p class="a-message">
You came to the wrong neighborhood
</p>
<div class="o-cat">
<div class="m-ears">
<div class="m-ear -right"></div>
<div class="m-ear -left"></div>
</div>
<div class="m-face">
<div class="m-eyes">
<div class="m-eye -left">
<div class="a-eyePupil"></div>
</div>
<div class="m-eye -right">
<div class="a-eyePupil"></div>
</div>
</div>
<div class="m-nose"></div>
</div>
</div>
</div>
@import url("https://fonts.googleapis.com/css?family=Shadows+Into+Light");
@maincolor: #fff;
@secondarycolor: #000;
html {
font-size: 16px;
font-family: "Shadows Into Light", cursive;
}
body {
height: 100vh;
display: flex;
align-items: flex-end;
justify-content: center;
background-color: @secondarycolor;
color: @maincolor;
}
.a-title {
font-size: 10rem;
text-align: center;
}
.a-message {
font-size: 2rem;
text-align: center;
}
.o-cat {
width: 35vh;
margin: auto;
padding: 3rem;
}
.m-ear,
.m-eye {
background-color: @maincolor;
}
.m-ears {
display: flex;
justify-content: space-between;
overflow: hidden;
padding: 1vh 0.5vh;
z-index: 1;
}
.m-ear {
height: 14vh;
width: 10vh;
border-radius: 40% 70% 10% 10% e("/") 100% 100% 10% 10%;
position: relative;
&.-left {
transform: rotateZ(15deg);
}
&.-right {
transform: rotateY(180deg) rotateZ(15deg);
}
&:after,
&:before {
content: "";
position: absolute;
width: 2px;
background-color: @secondarycolor;
bottom: 0;
right: 70%;
border-radius: 50%;
}
&:after {
height: 40%;
transform: rotate(15deg);
}
&:before {
height: 35%;
transform: rotate(-15deg);
}
}
.m-face {
position: relative;
background-color: @secondarycolor;
border-radius: 100% 100% 0 0;
margin: -8vh auto 0;
padding: 8vh 0 6vh;
width: 90%;
}
.m-eyes {
display: flex;
justify-content: space-around;
overflow: hidden;
}
.m-eye {
width: 10vh;
height: 8vh;
border-radius: 70%;
position: relative;
&:before {
content: "";
position: absolute;
height: 50%;
left: -2vh;
right: -2vh;
background-color: @secondarycolor;
border-radius: 0 0 35% 35%;
z-index: 2;
animation: eyes 5s ease infinite;
}
&:after {
content: "";
width: 10%;
height: 15%;
border-radius: 50%;
background-color: @maincolor;
position: absolute;
top: 40%;
}
&.-left:after {
right: -5%;
}
&.-right:after {
left: -5%;
}
}
.a-eyePupil {
background-color: @secondarycolor;
width: 30%;
left: 35%;
&,
&:after {
position: absolute;
height: 50%;
border-radius: 50%;
top: 25%;
}
&:after {
content: "";
background-color: @maincolor;
width: 20%;
left: 20%;
}
}
.m-nose {
border-radius: 50% 50% 50% 50% e("/") 30% 30% 70% 70%;
background-color: @maincolor;
width: 4vh;
height: 2vh;
margin: auto;
}
@keyframes eyes {
0%,
5%,
100% {
height: 50%;
}
2% {
height: 110%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment