CSS in CSS with a lot of C and S

Giulia Cardieri crafts a cascade of Cs and Ss with SCSS. Phew!

See the Pen CSS in CSS with a lot of C and S by Giulia Cardieri (@giuliacardieri) on CodePen.

Created on April 8, 2020 Updated on April 8, 2020. A Pen by Giulia Cardieri on CodePen. License.

index.html

<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>
$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);
  }
}
body {
  background-color: lightPink;
  margin: 0;
  padding: 0;
}

.container {
  align-items: center;
  display: flex;
  height: 100vh;
  justify-content: center;
}

.c {
  border-left: 20px solid #591630;
  box-shadow: -10px 0px 0 5px #7F2044, -20px 0px 0 6px #E14282, -30px 0px 0 7px rgba(225, 66, 130, 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);
  }
}

Categories:
W3TWEAKS
Latest posts by W3TWEAKS (see all)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *