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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                
<section class="cards">
    <div class="card card--oil">
        <div class="card__svg-container">
            <div class="card__svg-wrapper">
                
            </div>
        </div>
        <div class="card__count-container">
        </div>
        <div class="card__stuff-container">
            <div class="card__stuff-icon">
                
            </div>
            <div class="card__stuff-text"> Gallons of oil</div>
        </div>
    </div>
  
  
  
  
    <div class="card card--tree">
        <div class="card__svg-container">
            <div class="card__svg-wrapper">
                
            </div>
        </div>
        <div class="card__count-container">
            <div class="card__count-text">
            </div>
        </div>
        <div class="card__stuff-container">
            <div class="card__stuff-icon">
               
            </div>

    </div>
              
            
!

CSS

              
                *, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

$col-text: #686e74;
$shadow-col: #aac1c7;

$section-width: 80vw;
$section-max-width: 64rem;

$card-width: 35rem;
$card-height: 29rem;

$card1-width: 65rem;
$card1-height: 29rem;

$to-smaller: "screen and (max-width : 620px)";
$to-vertical: "screen and (max-width : 480px)";

@mixin flex-center() {
  display: flex;
  justify-content: center;
  align-items: center;
}

@mixin flex-bottom-center() {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

html, body {
  font-size: 62.5%;
  font-family: 'Raleway', sans-serif;

  @media #{$to-smaller} {
    font-size: 45%;
  }

  @media #{$to-vertical} {
    font-size: 70%;
  }
}

.forhtml {
  background: radial-gradient(circle at bottom, #aac1c7, #f7fbfb 80%) no-repeat center center fixed;
  background-size: cover;
}

body {
  color: $col-text;
  overflow-x: hidden;
  min-height: 100vh;
}

section {
  width: $section-width;
  max-width: $section-max-width;
  min-width: $card-width * 3.1;
  margin: 0 auto;

  @media #{$to-vertical} {
    min-width: $card-width;
  }
}

.title {
  font-size: 4rem;
  font-weight: 900;
  padding-top: 10vh;

  @media #{$to-vertical} {
    font-size: 3rem;
    text-align: center;
    position: relative;
    padding-top: 6vh;
  }

  &:after {
    content: "";
    display: block;
    height: .3rem;
    width: 5.4rem;

    background-color: #fbcd8a;
    transform: translate(.3rem, 2rem);

    @media #{$to-vertical} {
      left: 50%;
      position: absolute;
      transform: translate(-50%, 2rem);
    }
  }
}

.cards {
  padding-top: 2rem;

  display: flex;
  justify-content: space-between;

  @media #{$to-vertical} {
    flex-direction: column;
    align-items: center;
  }
}

.card {
  width: $card-width;
  height: $card-height;

  background-color: #f9fbfb;
  border-radius: 6px;

  position: relative;
  display: flex;
  flex-direction: column;

  color: #5a6c7a;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05rem;
  
  box-shadow: 0 1rem 3rem $shadow-col;

  @media #{$to-vertical} {
    margin-bottom: 2rem;
  }

  
  &__svg-container {
    height: 50%;
    @include flex-bottom-center();
  }

  &__svg-wrapper {
    width: 8rem;
  }

  &__count-container {
    flex-grow: 1;
    @include flex-center();
  }

  &__count-text {
    transform: translate(0, -.5rem);

    &--big {
      text-transform: uppercase;
      font-size: 5rem;
      font-weight: 300;
    }
  }

  &__stuff-container {
    margin: 0 auto;
    width: 90%;
    height: 15%;
    border-top: 2px solid #e7edef;
    @include flex-center();
  }

  &__stuff-icon, &__stuff-text {
    display: inline-block;
  }

  &__stuff-icon {
    width: 1.3rem;
    height: 1.3rem;
    transform: translate(0, -.3rem);
  }

  &__stuff-text {
    text-transform: uppercase;
    margin-left: .4rem;
    transform: translate(0, -.2rem);
  }

  &:after {
    content: "";
    display: block;
    position: absolute;
    top:0;
    left: 0;
    width: $card-width - 3rem;
    height: $card-height / 4;
    transform: translate(1.5rem, $card-height);
    pointer-events: none;
  }

  &--oil {
    &:after {
      background-image: radial-gradient(ellipse at top, rgba(106, 122, 135, 0.5), transparent 70%);
    }
  }

  &--tree {
    &:after {
      background-image: radial-gradient(ellipse at top, rgba(106, 191, 96, 0.5), transparent 70%);
    }
  }

  &--water {
    &:after {
      background-image: radial-gradient(ellipse at top, rgba(96, 203, 231, 0.5), transparent 70%);
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console