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

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

              
                h1 Using emoji as list bullet points

h2 1) Using the <code>@counter-style</code> CSS rule
p This will only currently work on Firefox 🦊 (see #[a(href='https://caniuse.com/#feat=css-at-counter-style') caniuse stats])
h3 Single emoji
ul.single-counter-rule
  li John
  li Paul
  li George
  li Ringo
  
h3 Set of repeating emoji
ul.repeating-counter-rule
  li Ross
  li Rachel
  li Phoebe
  li Joey
  li Chandler
  li Monica
  
h2 2) Using <code>::before</code> and <code>nth-child</code> selectors
h3 Single emoji
ul.single-before
  li John
  li Paul
  li George
  li Ringo

h3 Set of repeating emoji
ul.repeating-before
  li Ross
  li Rachel
  li Phoebe
  li Joey
  li Chandler
  li Monica
  
h2 Control) No styling
ul
  li Ross
  li Rachel
  li Phoebe
  li Joey
  li Chandler
  li Monica
              
            
!

CSS

              
                // Counter style at-rule
@counter-style single-emoji {
  system: cyclic;
  symbols: "\1F41B"; // unicode code point
  suffix: " ";
}

.single-counter-rule {
  list-style-type: single-emoji;
}

@counter-style repeating-emoji {
  system: cyclic;
  symbols: "\1F431" "\1F436" "\1F984"; // unicode code point
  suffix: " ";
}

.repeating-counter-rule {
  list-style-type: repeating-emoji;
}

// ::before psuedo-element
.single-before {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;

  li {
    padding-left: 1rem;
    text-indent: -0.7rem;
  }

  li::before {
    content: "🐻 ";
  }
}

.repeating-before {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;

  li {
    padding-left: 1rem;
    text-indent: -0.7rem;
  }

  li:nth-child(3n + 1)::before {
    content: "🐱 ";
  }

  li:nth-child(3n + 2)::before {
    content: "🐶 ";
  }

  li:nth-child(3n)::before {
    content: "🦄 ";
  }
}

// General styles for CodePen
ul {
  margin-bottom: 3rem;
}

li {
  font-size: 1.6rem;
}

body {
  font-family: sans-serif;
  margin-left: 3rem;
}

              
            
!

JS

              
                
              
            
!
999px

Console