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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

              
                <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"><symbol id="icon-tag" viewBox="0 0 24 24"><title>tag</title><g><path fill="currentColor" d="M22.707,12.293l-11-11C11.52,1.106,11.265,1,11,1H2C1.448,1,1,1.448,1,2v9c0,0.265,0.105,0.52,0.293,0.707 l11,11C12.488,22.903,12.744,23,13,23s0.512-0.098,0.707-0.293l9-9C23.098,13.317,23.098,12.684,22.707,12.293z M7,9 C5.895,9,5,8.105,5,7c0-1.105,0.895-2,2-2s2,0.895,2,2C9,8.105,8.105,9,7,9z"/></g></symbol></svg>

<div>
	<svg class="icon icon--xl"><use href="#icon-tag" xlink:href="#icon-tag"/></svg>

	<svg class="icon icon--lg"><use href="#icon-tag" xlink:href="#icon-tag"/></svg>

	<svg class="icon icon--md"><use href="#icon-tag" xlink:href="#icon-tag"/></svg>

	<svg class="icon icon--sm"><use href="#icon-tag" xlink:href="#icon-tag"/></svg>

	<svg class="icon icon--xs"><use href="#icon-tag" xlink:href="#icon-tag"/></svg>

	<p class="icon-text-aligner">
		<svg class="icon"><use href="#icon-tag" xlink:href="#icon-tag"/></svg>
		<span>This icon inherits the text color and size.</span>
	</p>
</div>

<div class="theme--dark">
	<p class="icon-text-aligner">
		<svg class="icon"><use href="#icon-tag" xlink:href="#icon-tag"/></svg>
		<span>This icon inherits the text color and size.</span>
	</p>
</div>
              
            
!

CSS

              
                /* _icons.scss -> .icon basic style */
:root {
	--icon-xs: 16px;
	--icon-sm: 24px;
	--icon-md: 32px;
	--icon-lg: 48px;
	--icon-xl: 64px;
}

.icon {
  display: inline-block;
  color: var(--color-icon-primary);
	height: 1em;
	width: 1em;
  line-height: 1;
}

/* icon size */
.icon--xs {
	font-size: var(--icon-xs);
}

.icon--sm {
	font-size: var(--icon-sm);
}

.icon--md {
	font-size: var(--icon-md);
}

.icon--lg {
	font-size: var(--icon-lg);
}

.icon--xl {
  font-size: var(--icon-xl);
}

/* align icon and text  */
.icon-text-aligner {
	/* add this class to parent element that contains icon + text elements */
	display: flex;
  align-items: center;

  > *:nth-child(2) {
    margin-left: 4px;
  }

  .icon {
    color: inherit;
    flex-shrink: 0;
  }
}

/* CSS color variables for light and dark background components */
:root {
  --color-primary-bg: white;
	--color-text: #6e5256;
	--color-icon-primary: #f7715d;
}

@supports(--css: variables) {
  .theme--dark {
    --color-primary-bg: #6e5256;
    --color-text: #ecf2e7;
    --color-icon-primary: #fcc37c;
  }
}

/* set color/bg-color for demo */
div {
  background-color: var(--color-primary-bg);
}

p {
  color: var(--color-text);
}

/* demo style */
div {
  text-align: center;
}

div:first-of-type {
  padding-top: 50px;
}

p {
  font-family: sans-serif;
  justify-content: center;
  padding: 50px 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console