Pen Settings



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


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.


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.


                <div class="alert">
	<i class="material-icons alert_icon swing">notifications</i>
	<p>Estimated wait times tonight are between 45-60 minutes. If you'd prefer carryout, call us at 515-867-5309.</p>


                // Styling the alert bar
.alert {
	padding: 0 1rem 2rem 1rem;
	text-align: center;
	line-height: 1.125;
	font-size: 1.25rem;
	font-weight: lighter;
	background-color: dodgerblue;
	color: white;
	.alert_icon {
		font-size: 2rem;
		margin: 2rem 0 1rem 0;

// Animation
.swing {
	animation: swing 1s 1s 1; // name, duration, delay, count
	transform-origin: top center;
	// keeps pivot point at top of bell

@keyframes swing {
	20% {
		transform: rotate(15deg);
	40% {
		transform: rotate(-10deg);
	60% {
		transform: rotate(5deg);
	80% {
		transform: rotate(-5deg);
	100% {
		transform: rotate(0deg);

// Bring in Material Icon font by Google

/* fallback */
@font-face {
	font-family: 'Material Icons';
	font-style: normal;
	font-weight: 400;
	src: local('Material Icons'), local('MaterialIcons-Regular'), url( format('woff2');

// Material Icon font syling by Google
.material-icons {
	font-family: 'Material Icons';
	font-weight: normal;
	font-style: normal;
	font-size: 24px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	-moz-font-feature-settings: 'liga';
	-moz-osx-font-smoothing: grayscale;

// Personal styles
body { font-family: sans-serif; }


                function swing_animation() {
	setInterval(function() {
	}, 3000);