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


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


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.


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.


                <!-- 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;