Skip to content

Instantly share code, notes, and snippets.

@gorlandor
Created March 10, 2017 02:05
Show Gist options
  • Save gorlandor/77c1c3722f7324a4ca56c6c3ee19f30e to your computer and use it in GitHub Desktop.
Save gorlandor/77c1c3722f7324a4ca56c6c3ee19f30e to your computer and use it in GitHub Desktop.
Tiger
<div class="tiger flex-vertically">
<div class="ears flex-horizontally">
<div class="ear left-ear flex-vertically">
<div class="inner-ear"></div>
</div>
<div class="ear right-ear flex-vertically">
<div class="inner-ear"></div>
</div>
</div>
<div class="face flex-vertically">
<div class="brows flex-horizontally">
<div class="brow left-brow"></div>
<div class="brow right-brow"></div>
</div>
<div class="eyes flex-horizontally">
<div class="eye left-eye flex-vertically">
<div class="retina"></div>
</div>
<div class="eye right-eye flex-vertically">
<div class="retina"></div>
</div>
</div>
<div class="face__lower-half flex-vertically">
<div class="cheeks flex-horizontally">
<div class="whiskers flex-vertically">
<div class="whisker left-whisker top-left-whisker"></div>
<div class="whisker left-whisker"></div>
<div class="whisker left-whisker bottom-left-whisker"></div>
</div>
<div class="mouth flex-vertically">
<div class="nose"></div>
<div class="flex-horizontally">
<div class="tooth left-tooth"></div>
<div class="tongue"></div>
<div class="tooth right-tooth"></div>
</div>
</div>
<div class="whiskers flex-vertically">
<div class="whisker right-whisker top-right-whisker"></div>
<div class="whisker right-whisker "></div>
<div class="whisker right-whisker bottom-right-whisker"></div>
</div>
</div>
</div>
</div>
</div>
:root {
--orange-color: #FFAE19;
--cream-color: #FFEAD0;
--green-color: #329932;
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100vh;
margin: 0;
padding: 0;
border: none;
background-color: #683257;
}
.flex-vertically {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.flex-horizontally {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.tiger {
width: 100%;
height: 100vh;
margin: 0;
padding: 0;
border: none;
}
.ear {
width: 4rem;
height: 4rem;
background-color: var(--orange-color);
border: 0.25rem solid black;
}
.ear.left-ear {
margin-right: .75rem;
transform: rotate(15deg);
}
.ear.right-ear {
margin-left: .75rem;
transform: rotate(-15deg);
}
.inner-ear {
width: 3rem;
height: 3rem;
background-color: var(--cream-color);
border: 2px solid black;
}
.face {
width: 12rem;
height: 12rem;
border-radius: 6rem;
background-color: var(--orange-color);
z-index: 1;
border: 0.25rem solid black;
}
.ears {
position: relative;
bottom: -3.5rem;
z-index: 0;
}
.brows {
margin-top: 0.5rem;
}
.brow {
width: 2.5rem;
height: 0.75rem;
background-color: black;
}
.brow.left-brow {
margin-right: 0.375rem;
transform: rotate(10deg);
}
.brow.right-brow {
margin-left: 0.375rem;
transform: rotate(-10deg);
}
.eyes {}
.eye {
width: 4rem;
height: 4rem;
border-radius: 2rem;
background-color: white;
border: 2px solid black;
}
.eye.left-eye {
margin-right: 0.25rem;
}
.eye.right-eye {
margin-left: 0.25rem;
}
.retina {
width: 2.3rem;
height: 2.3rem;
border: 0.25rem solid var(--green-color);
border-radius: 1.15rem;
background-color: black;
}
.nose {
width: 1.5rem;
height: 1rem;
background-color: black;
border-bottom-left-radius: 0.5rem;
border-bottom-right-radius: 0.5rem;
position: absolute;
top: 0.5rem;
}
.face__lower-half {
width: 12rem;
height: 6rem;
border-bottom-left-radius: 6rem;
border-bottom-right-radius: 6rem;
background-color: var(--orange-color);
border-right: 0.25rem solid black;
border-bottom: 0.25rem solid black;
border-left: 0.25rem solid black;
position: relative;
top: 0.4rem;
}
.cheeks {
width: 8rem;
height: 6rem;
border-top-left-radius: 3rem;
border-top-right-radius: 3rem;
border-bottom-left-radius: 6rem;
border-bottom-right-radius: 6rem;
background-color: var(--cream-color);
border: 2px solid black;
}
.mouth {
width: 4rem;
height: 2rem;
background-color: black;
border-bottom-left-radius: 2rem;
border-bottom-right-radius: 2rem;
}
.tongue {
width: 3.2rem;
height: 1rem;
background-color: pink;
border-bottom-left-radius: 2rem;
border-bottom-right-radius: 2rem;
position: relative;
bottom: 0.5rem;
border: 2px solid black;
}
.tooth {
width: .625rem;
height: 1.5rem;
background-color: white;
position: relative;
bottom: 0.25rem;
}
.tooth.left-tooth {
border-bottom-left-radius: 0.5rem;
border: 2px solid black;
}
.tooth.right-tooth {
border-bottom-right-radius: 0.5rem;
border: 2px solid black;
}
.whiskers {
position: relative;
bottom: 1.5rem;
}
.whisker {
width: 2rem;
height: 0.25rem;
background-color: black;
}
.whisker.left-whisker {
margin-top: 0.75rem;
margin-right: 1.5rem;
}
.whisker.right-whisker {
margin-top: 0.75rem;
margin-left: 1.5rem;
}
.whisker.left-whisker.top-left-whisker {
transform: rotate(20deg);
}
.whisker.left-whisker.bottom-left-whisker {
transform: rotate(-15deg);
}
.whisker.right-whisker.top-right-whisker {
transform: rotate(-20deg);
}
.whisker.right-whisker.bottom-right-whisker {
transform: rotate(15deg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment