Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="plants">
  <div class="plant ">
    <div class="leaves plant-1">

    </div>
  </div>
  <div class="plant plant-2">
    <div class="leaves plant-2">
    </div>
  </div>
  <div class="plant">
    <div class="leaves plant-3">
    </div>
  </div>
  <div class="plant plant-2">
    <div class="leaves plant-4">
    </div>
  </div>
              
            
!

CSS

              
                $background: #dbf4d4;
$dark-green: #4e7816;
$light-green: #568515;
$lighter-green: #77aa2f;
$pot-brown: #b86112;
$light-brown: #bf6a45;
$brown-shadow: #c06b46;
$wall-shadow: #c4dbbe;
$spike: #ebf9d6;
$spike-faded: #fdfefa;
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
*:before,
*:after {
  content: "";
  position: absolute;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
html,
body {
  height: 100%;
  width: 100%;
  background: $background;
}
.plants {
  height: 80vh;
  width: 80em;
  max-width: 80%;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: row;
  @media only screen and (max-width: 48em) {
    flex-wrap: wrap;
    height: 100%;
  }
}
.plant {
  position: relative;
  width: 25%;
  height: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  //pots
  &:before {
    width: 6.25em;
    height: 3.75em;
    top: calc(52vh - 3.75em);
    background: $pot-brown;
    border-radius: 0 0 40px 40px;
    background-image: linear-gradient(
      to bottom,
      transparent 1em,
      #a6580d 1em,
      #a6580d 1.5em,
      transparent 1.5em
    );
    box-shadow: 0.8em 0 $wall-shadow, 0 -0.1em $brown-shadow;
    z-index: 100;
  }
  //shelf
  &:after {
    width: 100%;
    height: 0.75em;
    top: 52vh;
    background: $light-brown;
    box-shadow: $brown-shadow 0 0.75em 0px -0.4em, $wall-shadow 0 0.5em 0 0,
      $wall-shadow 0 1.25em 0 0;
  }
  @media only screen and (max-width: 48em) {
    width: 50%;
    &:after {
      bottom: 4em;
    }
  }
}

.leaves {
  position: absolute;
  background: $light-green;
  box-shadow: 0.8em 0 $wall-shadow;

  &.plant-1 {
    width: 2.4em;
    height: 8.8em;
    top: calc(52vh - 3.75em - 8.8em);
    border-radius: 4em 4em 0 0;
    background-image: repeating-linear-gradient(
      to right,
      $dark-green,
      $dark-green 0.3em,
      transparent 0.3em,
      transparent 0.6em
    );
    &:before {
      width: 2em;
      height: 5.6em;
      top: 1.6em;
      left: -2.8em;
      background: inherit;
      border-radius: 4em 4em 0 4em;
      z-index: -1;
      background-image: inherit;
      box-shadow: inherit;
    }
    &:after {
      width: 1em;
      height: 2em;
      top: 5.2em;
      left: -1em;
      background: inherit;
      z-index: -1;
    }
  }
  &.plant-2 {
    width: 5.6em;
    height: 5.6em;
    top: calc(52vh - 3.75em - 4.8em);
    border-radius: 50%;
    background-size: 1.2em 1.2em, 1.2em 1.2em, 5.6em 5.6em;
    background-image: radial-gradient(
        1em 4.8em at center,
        $spike 3%,
        transparent 3%
      ),
      radial-gradient(4.8em 1em at center, $spike 3%, transparent 3%),
      radial-gradient(
        5.6em 15em at center,
        transparent 18%,
        $dark-green 18%,
        $dark-green 40%,
        transparent 40%
      );
  }
  &.plant-3 {
    width: 4em;
    height: 5.6em;
    top: calc(52vh - 3.75em - 4.8em);
    border-radius: 50% 50% 50% 50%;
    background-size: 0.8em 1em, 4em 4em;
    background-image: radial-gradient(
        $spike 6%,
        $spike-faded 6%,
        transparent 16%
      ),
      linear-gradient(to right, $dark-green 2em, transparent 2em);
    &:before {
      width: 4em;
      height: 5.6em;
      background: inherit;
      border-radius: inherit;
      transform: translate(80%, -25%) rotate(45deg) scale(0.75);
      box-shadow: inherit;
    }
    &:after {
      width: 4em;
      height: 5.6em;
      background: inherit;
      border-radius: inherit;
      transform: translate(90%, -75%) rotate(16deg) scale(0.45);
      z-index: -1;
      box-shadow: inherit;
    }
  }
  &.plant-4 {
    width: 3.6em;
    height: 8.4em;
    top: calc(52vh - 3.75em - 8.4em);
    border-radius: 50% 50% 0 0;
    background: $light-green;
    background-image: repeating-linear-gradient(
      to right,
      transparent,
      transparent 0.8em,
      $dark-green 0.8em,
      $dark-green 1.1em,
      transparent 1.1em
    );

    &:after {
      width: 2.8em;
      height: 4.8em;
      bottom: 0;
      left: -0.8em;
      border-radius: 48% 48% 0 0;
      background: $lighter-green;
      box-shadow: 0.4em 0 1.2em $dark-green;
      background-image: inherit;
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console