A Pen by Giulia Cardieri on CodePen.
Created
October 12, 2020 23:35
-
-
Save w3tweaks/96d286e9e314d912592bc14fa726a711 to your computer and use it in GitHub Desktop.
CSS in CSS with a lot of C and S
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="c"> | |
</div> | |
<div class="s"> | |
<div class="c"> | |
</div> | |
<div class="c"> | |
</div> | |
</div> | |
<div class="s"> | |
<div class="c"> | |
</div> | |
<div class="c"> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$color-main-1: #9C2855; | |
$color-main-2: #E14282; | |
$color-light: #FADCE4; | |
$color-darker: #7F2044; | |
$color-darkest: #591630; | |
body { | |
background-color: lightPink; | |
margin: 0; | |
padding: 0; | |
} | |
.container { | |
align-items: center; | |
display: flex; | |
height: 100vh; | |
justify-content: center; | |
} | |
.c { | |
border-left: 20px solid $color-darkest; | |
box-shadow: -10px 0px 0 5px $color-darker, -20px 0px 0 6px $color-main-2, -30px 0px 0 7px rgba($color-main-2, 0.6); | |
border-radius: 100% 50% 50% 100% / 100%; | |
height: 200px; | |
width: 180px; | |
} | |
.s { | |
display: flex; | |
flex-direction: column; | |
} | |
.s:not(:last-of-type) { | |
margin-right: 75px; | |
} | |
.s > .c { | |
height: 100px; | |
width: 100px; | |
} | |
.s > .c:last-of-type { | |
transform: rotate(185deg) translateX(5px) translateY(-2px); | |
} | |
@media (max-width: 768px) { | |
.c { | |
height: 100px; | |
width: 90px; | |
} | |
.s:not(:last-of-type) { | |
margin: 0 75px 0 25px; | |
} | |
.s > .c { | |
height: 50px; | |
width: 50px; | |
} | |
} | |
@media (max-width: 500px) { | |
.container { | |
transform: scale(0.8); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment