Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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="order">
  <h1 class="order__title no-margin">Order summary</h1>
  <svg id="svg-summary" width="24" height="24" viewBox="0 0 24 24">
  <path d="M7,8V6H5V19H19V6H17V8H7M9,4A3,3 0 0,1 12,1A3,3 0 0,1 15,4H19A2,2 0 0,1 21,6V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6A2,2 0 0,1 5,4H9M12,3A1,1 0 0,0 11,4A1,1 0 0,0 12,5A1,1 0 0,0 13,4A1,1 0 0,0 12,3Z"></path>
</svg>
  <section class="order__sub-sections order__subtotal clearfix ">
    <h2 class="order__subtitles no-margin">Subtotal</h2>
    <table id="values" class="order__subtotal__table">
      <tbody>
        <tr>
          <td class="first-row">Product (<a href="#">1 item</a>)</td>
          <td class="first-row" align="right">R$ 179,00</td>
        </tr>
        <tr>
          <td>Freight</td>
          <td align="right">Free</td>
        </tr>
        <tr class="values--discounts">
          <td>Discount plus:</td>
          <td align="right">-R$ 10,00</td>
        </tr>
        <tr class="values--discounts">
          <td>Discount by type of payment:</td>
          <td align="right">-R$ 16,90</td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td class="values__total">Total</td>
          <td class="values--total-price">R$ 152,10</td>
        </tr>
        <tr>
          <td colspan="2" align="right">1x interest-free - R$ 152,10 (with discount)</td>
        </tr>
      </tfoot>
    </table>
  </section>
  <section class="order__sub-sections order__address">
    <h2 class="order__subtitles no-margin">Delivery address</h2>
    <p class="address--client no-margin">Kyle Hide</p>
    <p class="address--street no-margin">Cape West Street</p>
    <p class="address--region no-margin">Red Crown - New York US</p>
    <p class="address--zipcode no-margin">ZipCode: 341946</p>
  </section>
  <section class="order__sub-sections order__sms clearfix">
    <div class="sms__svg">
      <svg width="32" height="32" viewBox="0 0 24 24">
        <path d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9Z"></path>
      </svg>
    </div>
    <div class="sms__info">
      <h2 class="order__subtitles no-margin">SMS Notification</h2>
      <p class="no-margin">Celphone registered:</p>
      <span>(00) 215-DUSK</span>
      <form action="">
        <input type="number" class="info__celphone">
        <button>Ok</button>
      </form>
    </div>
    <button class="btn-primary">Remover</button>
  </section>
</section>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Work+Sans');

// colors
$black: #000;
$green: #6fa450;
$light-grey: #f4f4f4;
$grey: #ccc;
$white: #fff;
$yellow: #fd0;

// typography
$font-size-base: 14px;

// reset
.no-margin { margin: 0; }

a { color: inherit; }

// FIX
.clearfix,
.clearfix:before {
  content: '';
  clear: both;
  display: table;
}

.order {
  background-color: $light-grey;
  font-family: 'Work Sans', sans-serif;
  font-size: $font-size-base;
  padding: 15px;
  max-width: 320px;
  
  * {
    // outline: 1px dotted orangered;
  }
  
  // HEAD
  .order__title {
    float: left;
    margin-bottom: 20px;
  }
  
  #svg-summary {
    float: right;
  }
  
  .order__subtitles {
    margin-bottom: 10px;
    line-height: 1em;
  }
  
  &__sub-sections {
    margin-bottom: 20px;
    margin-top: 20px;
    width: 100%;
  }
  
  &__subtotal {
    // outline: 1px dotted orangered;
    &__table {
      // outline: 1px dotted orangered;
      border-spacing: 0;
      width: 320px;
      
      tbody {
        background-color: $white;
        border: 1px solid $black;
        tr:first-child {
          td {
            border-top: 1px solid $black;
          }
        }
        tr {
          td {
            padding: 5px;
          }
        }
        .values--discounts {
          color: $green;
          font-weight: bold;
        }
      }
      tfoot {
        tr:first-child {
          td {
            border-top: 1px solid $black;
            padding: 5px 0;
          }
        }
        .values--total-text,
        .values--total-price {
          font-size: 1.857rem;
          font-weight: bolder;
          white-space: pre;
        }
      }
    }
  }
  &__address {
    
  }
  
//   &__sub-sections {
//     margin-bottom: 20px;
//     margin-top: 20px;
//     width: 100%;
    
//     table {
//       border-spacing: 0;
//       width: 320px;
      
//       tbody {
//         background-color: $white;
//         border: 1px solid $black;
//         tr:first-child {
//           td {
//             border-top: 1px solid $black;
//           }
//         }
//         tr {
//           td {
//             padding: 5px;
//           }
//         }
//         .discount-text {
//           color: $green;
//           font-weight: bold;
//         }
//       }
//       tfoot {
//         tr:first-child {
//           td {
//             border-top: 1px solid $black;
//             padding: 5px 0;
//           }
//           .values--total-text,
//           .values--total-price {
//             font-size: 1.857rem;
//             font-weight: bolder;
//             white-space: pre;
//           }
//         }
//       }
//     }
//   }
//   .order--address {
//     border-bottom: 1px solid $grey;
//     border-top: 1px solid $grey;
//     padding-bottom: 15px;
//     padding-top: 10px;
//   }
//   .order--sms {
//     margin-bottom: 0;
    
//     .sms--info,
//     .sms--svg {
//       display: inline-block;
//       vertical-align: middle;
//     }
//     .sms--svg {
//       padding: 0 30px;
//       svg {
//         fill: $green;
//       }
//     }
//     button {
//       background-color: $yellow;
//       border: 0px none;
//       clear: both;
//       display: block;
//       font-size: 1em;
//       margin-top: 20px;
//       padding: 10px 0;
//       width: 100%;
//     }
//   }
}

              
            
!

JS

              
                
              
            
!
999px

Console