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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                .egg-container
  .egg-container.egg-container--inner
    .egg
      .stripes
        .dots
        .line
        .zigzag
        .line
        .dots
        .line
        .zigzag
        .line
    .egg.egg-small
      .stripes
        .line
        .line
        .line
        .line
        .line
        .line
        .line
        .line
    .egg.egg-small2
      .stripes
        .dots
        .blank
        .dots.dots-offset
        .blank
        .dots
        .blank
        .dots.dots-offset
        .blank
  .grass
    .blade
    .blade.blade--l.blade--left
    .blade.blade--l.blade--right
    .blade
    .blade.blade--l.blade--left
    .blade.blade--l.blade--right
    .blade.blade--l.blade--left
    .blade.blade--l.blade--left
    .blade.blade--l.blade--left
    .blade.blade--l.blade--right
  .grass.grass2
    .blade
    .blade.blade--s.blade--right
    .blade.blade--s.blade--right
    .blade
    .blade.blade--l.blade--left
    .blade.blade--l.blade--right
    .blade
    .blade.blade--s.blade--left
    .blade.blade--s.blade--right
    .blade.blade--l.blade--left
    .blade.blade--l.blade--right
  .grass.grass3
    .blade
    .blade.blade--s.blade--left
    .blade.blade--s.blade--right
    .blade
    .blade.blade--l.blade--left
    .blade.blade--l.blade--left
    .blade
    .blade.blade--s.blade--right
    .blade.blade--s.blade--right
    .blade
    .blade.blade--l.blade--left
    .blade.blade--l.blade--right
              
            
!

CSS

              
                $color1: #231f20;
$color2: #fe6581;  // pink
$color3: #f8d90f;  // yellow
$color4: #a5d96b;  // green
$color5: #e578d5;  //purple
$color6: #4482d9;  // blue
$background: #4482d9;
$stripes: white;
$plant-border: #aad670;
$plant-fill: #abe07a;

body {
  background: #eeeef0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  height: 100vh;
  margin: 0;
  background-color:#eeeef0;
  background-image: radial-gradient(white 15%, transparent 16%),
  radial-gradient(white 15%, transparent 16%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
}

.egg-container {
  width: 100%;
  background: #b9b9c1;
  margin: auto;
  max-width: 80vh;
  box-sizing: border-box;
  border: 3.5vh solid #d4d4d9;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  
  &:after {
    content: "";
    display: block;
    padding-bottom: 100%;
        width: 100%;
    border-radius: 50%;
    z-index: 10;

  box-shadow: inset 0px 0px 20px 0px rgba(0, 0, 0, 0.5);
  }
  
  .egg-container--inner {
  background: skyblue;
    position: absolute;
    border: none;
    width: 90%;
  justify-content: center;
  align-items: flex-end;
  }
}
.egg {
  background: $background;
  border-radius: 50%/60% 60% 40% 40%;
  overflow: hidden;
  position: absolute;
  box-shadow: 0 0 10px 5px rgba(0,0,0,0.1);
}

.egg:after, .stripes:after {
  content: "";
  display: block;
  padding-bottom: 150%;
}
.stripes {
  position: absolute;
  overflow: hidden;
  border-radius: 50%/60% 60% 40% 40%;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.dots,
.line,
.zigzag {
  position: absolute;
  left: -8%;
  width: 120%;
  transform: rotate(-15deg);
}

.dots {
  border-top: 2vh dotted $color1;
}

.line {
  border-top: 2vh solid $color1;
}

.zigzag {
   background: linear-gradient(135deg, $background 25%, transparent 25%) -50px 0,
    linear-gradient(225deg, $background 25%, transparent 25%) -50px 0,
    linear-gradient(315deg, $background 25%, transparent 25%),
    linear-gradient(45deg, $background 25%, transparent 25%);
    background-size: 20px 20px;
    
  height: 20px;
  -webkit-backface-visibility: hidden;
}

.stripes div {
  border-color: $stripes;
  
  &.zigzag {
    
  background-color: $stripes;
  }
}

.stripes div:nth-child(1) {
  top: 8%;
}

.stripes div:nth-child(2) {
  top: calc((80% / 7) + 8%);
}

.stripes div:nth-child(3) {
  top: calc((80% / 7) * 2 + 8%);
}

.stripes div.zigzag:nth-child(3) {
  top: calc((80% / 7) * 2 + 8%);
  border:none;
}

.stripes div:nth-child(4) {
  top: calc((80% / 7) * 3 + 8%);
}

.stripes div:nth-child(5) {
  top: calc((80% / 7) * 4 + 8%);
}

.stripes div:nth-child(6) {
  top: calc((80% / 7) * 5 + 8%);
}

.stripes div:nth-child(7) {
  top: calc((80% / 7) * 6 + 8%);
}

.stripes div.zigzag:nth-child(7) {
  top: calc((80% / 7) * 6 + 8%);
  border:none;
}

.stripes div:nth-child(8) {
  top: calc(88%);
}

.egg {
  width: 50%;
}
.egg-small {
  width: 45%;
  transform: translate(-60%, 10%);
  background: $color5;
  
  .stripes .line {
    border-width: 2px;
  }
}

.egg-small2 {
  width: 38.5%;
  transform: translate(60%, 20%);
  background: $color2;
  
  .stripes div {
    
  }
}

.dots-offset {
      transform: translate(11%, -22%) rotate(-15deg);
  border-width: 1.7vh;
}


.grass {
  left: 0;
  bottom: -5%;
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.grass2 {
  transform: translate(8%, 1%);
  opacity: 0.9;
}

.grass3 {
  transform: translate(4%, 2%);
  opacity: 0.9;
}
.blade {
  position: relative;
  overflow: hidden;
  transform-origin: 50% 100%;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-end;
	
	&:before, &:after {
    content: "";
    position: absolute;
    bottom: 0;
    border-top: 0;
    border-radius: 50%;
	}
}

.blade {
	animation: wave 3s -1.2s infinite ease-in-out;
	&:before {
		right:15%;
		height:37.5%;
		width:225%;
		border-right: 2.5vh solid $plant-border;
		transform: rotateZ(15deg);
   
	}
	
	&:after {
		right:24%;
		height:37.5%;
		width:225%;
		border-right: 2vh solid $plant-fill;
		transform: rotateZ(15deg);
	}
  
  @media screen and (orientation: portrait) {
	&:before {
		border-right: 2.5vw solid $plant-border;
   
	}
	
	&:after {
		border-right: 2vw solid $plant-fill;
	}
    
  }
  
  &.blade--s {
    width:50%;
    height: 50%;
  }
  
  &.blade--l {
    width:75%;
    height: 75%;
  }
  
  &.blade--right {
    
	&:before {
    border:none;
    left: 15%;
    right: unset;
		border-left: 2.5vh solid $plant-border;
		transform: none;
   
	}
	
	&:after {
    left: 24%;
    right: unset;
    border:none;
		border-left: 2vh solid $plant-fill;
		transform: rotateZ(-10deg);
	}
  
  @media screen and (orientation: portrait) {
	&:before {
		border-left: 2.5vw solid $plant-border;
   
	}
	
	&:after {
		border-left: 2vw solid $plant-fill;
	}
    
  }
  }
}

@keyframes wave {
	0% {
		transform: rotateZ(3deg) translateZ(-1px);
	}
	25%{
		transform: rotateZ(-4deg) translateZ(-1px);
	}
	50% {
		transform: rotateZ(2deg) translateZ(-1px);
	}
	75% {
		transform: rotateZ(-6deg) translateZ(-1px);
	}
	100% {
		transform: rotateZ(3deg) translateZ(-1px);
	}
}

@keyframes wave2 {
	0% {
		transform: rotateZ(0deg) translateZ(-1px);
	}
	25%{
		transform: rotateZ(-3deg) translateZ(-1px);
	}
	50% {
		transform: rotateZ(3deg) translateZ(-1px);
	}
	75% {
		transform: rotateZ(-1deg) translateZ(-1px);
	}
	100% {
		transform: rotateZ(0deg) translateZ(-1px);
	}
}
              
            
!

JS

              
                // Original grass from https://codepen.io/kacpertn4t/pen/EXpaqQ
              
            
!
999px

Console