Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <!-- My take on the design for one of the exercises from -->
    <div class="card">
      <h2 class="card__title">Really nice shirt</h2>
        alt="a really nice shirt"
      <p class="card__price">$49.<span>99</span></p>
      <p class="card__desc">
        Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor totam
        perferendis unde itaque quidem magnam eligendi autem!
      <a href="#" class="btn btn--accent">Add to cart</a>
      <a href="#" class="btn">Add to wishlist</a>
              // challenged myself to work with some unusual greens
// variables
// color palette
$background: #d0d6e2;
$primary: #adb993;
$secondary: #b4b631;
$highlight: #f6ca83;
$accent-color: #215b96;
$font-color: #0f0e0e;

// typography
$primary-font: 'Raleway', sans-serif;

$fw-l: 300;
$fw-n: 500;
$fw-b: 900;

// friends
$spacer: 1rem;

// mixins

@mixin font($size: 1.6rem, $weight: $fw-n, $color: $font-color, $line-h: 1.35) {
  font-size: $size;
  font-weight: $weight;
  color: $color;
  line-height: $line-h;

@mixin box-shadow(
  $ho: 0,
  $vo: 0,
  $blur: 0,
  $spread: 0,
  $color: rgba(black, 0.1)
) {
  box-shadow: $ho $vo $blur $spread $color;

@mixin button($padding, $color: $font-color) {
  display: inline-block;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: $spacer * 0.05;
  padding: $padding;
  color: $color;
  border-radius: 5px;

@import url(',500,900');

// general
html {
  font-size: 10px;

* {
  margin: 0;
  padding: 0;

body {
  @include font;
  font-family: $primary-font;
  background: $background;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

// card
.card {
  width: 400px;
  background: $primary;
  background: linear-gradient(to top left, $secondary, $primary 65%);
  @include box-shadow($blur: 25px, $spread: 15px);
  position: relative;
  padding: $spacer * 1.5 $spacer * 2 $spacer * 1.5 $spacer * 20;
  border-radius: 5px;

  &__image {
    position: absolute;
    top: 6%;
    left: -21%;

  &__title {
    @include font(6rem, $fw-l, #fff, 1.25);
    text-align: right;
    letter-spacing: $spacer * 0.5;
    text-transform: uppercase;
    margin-bottom: $spacer;

    &::first-letter {
      font-size: 8rem;
      color: $highlight;
      border-bottom: 5px solid $accent-color;

  &__price {
    @include font(5rem, $fw-l, lighten($font-color, 10));
    text-align: right;
    margin-right: $spacer * 6.5;
    margin-bottom: $spacer;

    span {
      font-size: 3rem;

  &__desc {
    @include font($size: 1.75rem, $line-h: 1.5);
    padding: $spacer;
    margin-bottom: $spacer;

.btn {
  @include button($spacer * 1.25 $spacer * 2.5);
  transition: all ease-in 0.35s;

  &:hover {
    color: #fff;

  &--accent {
    @include button($spacer * 1.25 $spacer * 2.5, $highlight);
    background: $accent-color;
    border-bottom: 1px solid $highlight;
    border-right: 1px solid $highlight;

    &:hover {
      transform: scale(0.99);
      color: #fff;

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.