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

              
                link(href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet")

nav#navigation
	ul
		li
			a(href="#")
				i.ion-ios-speedometer-outline
				span Dashboard
		li
			a(href="#")
				i.ion-chatbubbles
				span Forum
		li.dropdown(rel="1")
			a(href="#")
				i.ion-email
				span Messages
				ul.dropdown-1
					li
						a(href="#")
							i.ion-email
							span Read
					li
						a(href="#")
							i.ion-email-unread
							span Unread
					li
						a(href="#")
							i.ion-plus
							span Create Message
		li.dropdown(rel="2")
			a(href="#")
				i.ion-gear-a
				span Settings
				ul.dropdown-2
					li
						a(href="#")
							i.ion-person
							span Edit Profile
					li
						a(href="#")
							i.ion-gear-b
							span Edit Options
		li
			a(href="#")
				i.ion-log-out
				span Logout
#wrapper
	span Lorem ipsum dolor sit amet, pri at quot exerci, pri in debet detraxit. Nostrum postulant has ut, ne pri tempor albucius accommodare, dicat munere integre id est. Ut liber ignota temporibus quo, vel modus doctus honestatis eu, his ea atqui veniam suscipit. Cu tritani torquatos has, cu civibus petentium disputando duo. Oporteat molestiae urbanitas ei mel. Id verear meliore nonumes est, no affert oporteat sapientem vis.
              
            
!

CSS

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

@function tint($percent) {
	@return mix(white, black, $percent);
}

$bg: tint(15);
$bg-hover: tint(18);

$sub-bg: tint(9);
$sub-bg-hover: tint(12);

$border: #293649;
$link-color: #126CA1;
$font: 'Open sans', sans-serif;

$time: 150ms;

@mixin transition($duration, $timing-func) {
	-webkit-transition: $duration $timing-func all;
	   -moz-transition: $duration $timing-func all;
			transition: $duration $timing-func all;
}

* {
	margin: 0;
	padding: 0;
	font-family: $font;
	-webkit-box-sizing: border-box;
	   -moz-box-sizing: border-box;
			box-sizing: border-box;
}

body {
	background: #333;
}

nav#navigation {
	position: fixed;
	width: 225px;
	height: 100%;
	background: $bg;
	border-right: 1px solid $border;

	ul {
		list-style: none;

		li {
			position: relative;
			display: block;
			width: 100%;
			height: 60px;
			border-bottom: 1px solid $border;
			
			&.active {
				background: $bg-hover;
			}
			
			&.dropdown {
				//Include this if you want pure CSS dropdown menus
				&:hover {
					ul[class*="dropdown-"] {
						visibility: visible;
						opacity: 1;
					}
				}
				
				&:before {
					font-family: ionicons;
					content: "\f125";
					position: absolute;
					margin: 20px 0 0 0;
					left: 85%;
					color: #aaa;
				}
			}

			&:hover:after {
				width: 225px;
			}

			&:after {
				content: " ";
				position: absolute;
				z-index: 1;
				width: 0px;
				height: 2px;
				margin: -2px 0 0 0;
				background: $link-color;
				@include transition($time, ease);
			}

			a {
				display: block;
				width: 100%;
				line-height: 60px;
				padding: 0 15px;
				text-decoration: none;
				color: #aaa;
				@include transition($time, ease);
				
				&:hover {
					background: $bg-hover;
					color: #eee;
				}
				
				i,
				span {
					display: inline-block;
				}
				
				i {
					position: absolute;
					font-size: 1.3em;
				}
				
				span {
					margin: 0 0 0 35px;
					font-size: 0.85em;
				}
			}

			ul[class*="dropdown-"] {
				position: absolute;
				display: block;
				margin: -61px 0 0 225px;
				visibility: hidden;
				opacity: 0;
				@include transition($time, ease);
				
				li {
					width: 225px;
					background: $sub-bg;
					a {
						&:hover {
						background: $sub-bg-hover;
						}
					}
				}
			}
		}
	}
}

#wrapper {
	margin: 0 0 0 225px;
	padding: 15px;
	color: #aaa;
}
              
            
!

JS

              
                /*
*	Remove jQuery if you want pure css dropdown menus
*/

/*jQuery(document).ready(function($) {
	$("li.dropdown").hover(function() {
		var id = $(this).attr("rel");
		$(this).toggleClass("active");
		$("ul.dropdown-" + id).toggle("fade", 250);
	});
});*/
              
            
!
999px

Console