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

              
                <body>
		<header>
			<h1>Katsuno</h1>
			<button id="toggle-menu" class="header-button">Menu</button>
			<button id="toggle-basket" class="header-button">Cart</button></li>
			<button id="toggle-search" class="header-button">Search</button></li>
			<form id="search-form" action="">
				<fieldset>
					<input name="search-terms" type="search" placeholder="Search (for example: skirt)" />
				</fieldset>
				<input type="submit" value="Ok" />
			</form>
		</header>

		<div class="main">
		</div>
</body>
              
            
!

CSS

              
                @import "compass/css3";

@import "compass";

html {
	font: 62.5%/1 "Lato", sans-serif;
}

body {
	width: 480px;
	margin: 20px auto;
	color: #0b171f;
	background-color: #fff;
}

body > header {
	@include pie-clearfix;
	position: relative;
	color: #fff;
	background-color: #25323d;

	h1 {
		position: absolute;
		top: 0;
		left: 0;
		z-index: 0;
		margin: 0;
		width: 100%;
		line-height: 60px;
		font-size: 2.4em;
		font-weight: 300;
		text-align: center;
		text-transform: uppercase;
		letter-spacing: 0.3em;
	}
}

.header-button {
	@include box-sizing(border-box);
	@include hide-text();
	position: relative;
	z-index: 1;
	display: block;
	width: 60px;
	height: 60px;
	margin: 0;
	padding: 0;
  outline: none;
	background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAA8CAQAAABlJ1gMAAABfElEQVR42u3ZsU7CUBhA4U6Iib5IITigOzMzzwUMmNA3MRofwMSRCDB1MPIAOoDBHAch0VhUCb2Ecr4uBJb23Oa/FKJIkiRJkiRJkiRJygENElJSEhpEmxz6W+Z7Vu43S71PlxvTZsiMGQ+0iTe7szY6EuCOmJg7IClwaEr0eOOzN/ocBwqdwnJhYyAtbGhK3ACQcEGZMhckANxSChIayHxduNCXwISzL6deYQT0Chma3+RzmRUWQO3b+2fAgkrOgbd0vfsQurN2A0qATgFD72hwDIHzzNM/B4YBRkbW6Chg6DlwlHn6R8Dc0PmHPgWeA22C//lsT2f0+tFRBwaGDrMZdgsYekejo7rm610NWFA1dIgHlqtgDyoHEXr1CN6nTokT6vQBgAktZ/Q2j6wfla6ZAOMcUx9g6I9h0WXEKy8M6FIlosU419SHNjp+WPp8Uxs6UGpDZ6Y2dJDUedzRTz/uSFP/nN3WAjaZrs38SNPQkiRJkiRJkiRJKoB36w+U2Cj/A/EAAAAASUVORK5CYII=');
	border: none;
	cursor: pointer;
}

#toggle-menu {
	float: left;
	background-position: 0 0;
	background-color: #bc0023;
}

#toggle-search {
	float: right;
	background-position: -60px 0;

	&.open:after {
		top: 40px;
	}

	&:after {
		@include transition(top, 0.5s);
		position: absolute;
		top: 52px;
		left: 50%;
		margin-left: -8px;
		content: "";
		border-color: transparent transparent #e1e4e7;
		border-style: solid;
		border-width: 8px 8px 12px;
	}
}

#toggle-basket {
	position: relative;
	float: right;
	background-position: -120px 0;

	&:before {
		position: absolute;
		top: 5px;
		left: 0;
		width: 2px;
		height: 50px;
		content: "";
		background-color: #000;
	}
}

#search-form {
	@include transition(max-height, 0.5s);
	position: absolute;
	top: 60px;
	left: 0;
	width: 100%;
	max-height: 0;
	overflow: hidden;
	background-color: #e1e4e7;

	&.open {
		max-height: 60px;
	}

	fieldset {
		position: relative;
		margin: 0 60px 0 0;
		padding: 0;
		border: none;
	}

	input {
		@include box-sizing(border-box);
		display: block;
		height: 60px;
	}

	input[type="search"] {
		width: 100%;
		padding: 0 5px 0 22px;
		background: transparent;
		border: none;
	}

	input[type="submit"] {
		position: absolute;
		bottom: 0;
		right: 0;
		width: 60px;
		margin: 0;
		padding: 0;
		font-weight: 700;
		text-transform: uppercase;
		color: #516270;
		background: #c6cacd;
		border: none;
		cursor: pointer;
	}
}
              
            
!

JS

              
                (function($) {

		// Handle click on toggle search button
		$('#toggle-search').click(function() {
			$('#search-form, #toggle-search').toggleClass('open');
			return false;
		});

		// Handle click on search submit button
		$('#search-form input[type=submit]').click(function() {
			$('#search-form, #toggle-search').toggleClass('open');
			return true;
		});

		// Clicking outside the search form closes it
		$(document).click(function(event) {
			var target = $(event.target);
      
			if (!target.is('#toggle-search') && !target.closest('#search-form').size()) {
				$('#search-form, #toggle-search').removeClass('open');
			}
		});

})(jQuery);
              
            
!
999px

Console