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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                main#st-main
	button.material-button
		| Material Button
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto:500)

*, *:after, *:before
	margin: 0
	padding: 0
	box-sizing: border-box

main#st-main
	background: #3F51B5
	width: 100%
	height: 100vh
	display: flex
	justify-content: center
	align-items: center
	
	.material-button
		padding: 25px 45px
		font-size: 1.8rem
		font-family: "Roboto", sans-serif
		position: relative
		user-select: none
		color: #fff
		background: #448AFF
		border: 0
		box-shadow: 0px 3px 6px rgba(0,0,0,0.3)
		transition: all 200ms ease-in-out
		cursor: pointer
		overflow: hidden
		&:hover
			box-shadow: 0px 6px 8px -3px rgba(0,0,0,0.3)
			transform: translateY(-5px)
		&:focus
			outline: none
.taint
	display: block
	position: absolute
	background: rgba(130, 177, 255, 0.5)
	border-radius: 100%
	transform: scale(0)
	&.drop
		animation: ripple 0.65s linear
		
	@keyframes ripple
		100% 
			opacity: 0
			transform: scale(2.5)
              
            
!

JS

              
                $(function() {
	var taint, d, x, y;
	$(".material-button").click(function(e){
		if ($(this).find(".taint").length == 0) {
			$(this).prepend("<span class='taint'></span>")
		}
		taint = $(this).find(".taint");
		taint.removeClass("drop");
		if(!taint.height() && !taint.width()) {
			d = Math.max($(this).outerWidth(), $(this).outerHeight());
		taint.css({height: d, width: d});
		}
		x = e.pageX - $(this).offset().left - taint.width()/2;
		y = e.pageY - $(this).offset().top - taint.height()/2;
		taint.css({top: y+'px', left: x+'px'}).addClass("drop");
	});
});
              
            
!
999px

Console