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.

              <div class="container">
  <h1>Automatic Quotes</h1>
  <p>This is a test on a simple way to use the data-attribute to deligate a snippet of text to quickly and easily use as a blockquote or pullquote.<p>
  <p>This is a nice way to keep your HTML a bit more DRY. <span data-quote>DRY! DRY! DRY!</span> Boy it's late! It's like 4am. Why am I still awake? Surely I could've waited and done this in the morning.</p>
  <p>Anyways, there's two ways to achive this. Version 1: You can simply clone the 'span[data-quote]' element and add a class and then append or prepend it to the nth-child. Version 2 uses wrapInner() to create a blockquote around the text.</p>
  <p>You could go even further and create an extensive selection of attributes: data-blockquote, data-pullquote, data-left-quote, data-right-quote etc. Once you're css is right you could have unlimited options with ease.<p>
              @import "compass/css3";

@import url(;
@import url(;

*::after {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;

body {
  background-color: hsl(190, 40, 50%);

.container {
  margin: 0 auto;
  max-width: 40em;
  text-align: justify;

h1 {
  font: {
    family: "Cinzel Decorative",Georgia, serif;
    size: 4em;
  text-align: center;

p {
  font-family: "Gudea", sans-serif;

// Version 1
.quote {
  font: {
      family: Georgia, serif;
      size: 2em;
      style: italic;
  // background-color: hsl(50, 50, 85%);
  color: white;
  float: left;
  text-align: right;
  margin-right: 0.5em;
  max-width: 9.5em;
  padding: 0.5em;

.quote::before {
  content: "\201C";

.quote::after {
  content: "\201D";

// Version 2
// TODO: style blockquote
              $(document).ready(function() {
  // Version 1
  // Version 2
   * More specific slection using 'nth' pseudo 
   * selector
   * Use wrapInner() to wrap the textnode in a 
   * traditional blockquote
  /*$('span[data-quote]').clone().prependTo('p:nth-child(2)').wrapInner('<blockquote />');*/

🕑 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.