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.


                %h1 Custom CSS Scrollbar

	%h2 Default
	%h2 Dark
	%h2 Light
	%h2 Light Reversed
	%h2 Seafoam

	%h2 Extreme


                $blue: #3498db
$green: #1abc9c
$red: #c0392b
$stone: #bdc3c7
$slate: darken($stone, 50)
$yellow: #f1c40f

	overflow-y: scroll
	padding: 5%
	background: $stone

	max-width: 100%
	vertical-align: bottom

	font-size: 1.1rem

// Demo
// ----

	float: left
	height: 400px
	margin: 0 1em 0 0
	padding: 0 0 3em
	width: 170px

	background: #fff
	height: 100%
	overflow: auto
	-webkit-overflow-scrolling: touch
	height: 200%
	width: 400%
	$line-color: rgba(#000, .1)
	$line-size: 1px
	$space-between: 50px
	background-image: linear-gradient(to right, $line-color $line-size, transparent $line-size), linear-gradient(to bottom, $line-color $line-size, transparent $line-size)
	background-size: $space-between $space-between

// Sass mixin that customizes the browser scrollbar
// $thumb-color - moving part of the scrollbar
// $track-color - background of the scrollbar
// $variation - 'lighten' or 'darken'
// $size - horizontal width and vertical height of the scrollbar
=scrollbars($thumb-color: #606060, $track-color: #393939, $variation: 'lighten', $size: 10px)
	// Firefox:
	scrollbar-color: $thumb-color $track-color

	@if $size < 15px
		scrollbar-width: thin

	// Webkit:

		height: $size
		width: $size
		background-color: red

		background: $track-color

		background: $thumb-color
		border: 1px solid $track-color

			@if $variation == 'lighten'
				background: lighten($thumb-color, 15)
			@if $variation == 'darken'
				background: desaturate(darken($thumb-color, 40), 20)
		// &:active
		// 	@if $variation == 'lighten'
		// 		background: lighten($thumb-color, 30)
		// 	@if $variation == 'darken'
		// 		background: desaturate(darken($thumb-color, 50), 20)

		border: 1px solid $track-color
		background-color: $track-color

// Variations

	background: rgba(#1c1c1c, .7)

	+scrollbars(#eaeaea, #d4d4d4, 'darken')

	+scrollbars(#d4d4d4, #eaeaea, 'darken')
	+scrollbars(#def1ee, #bcd7d2, 'darken')
	+scrollbars(gold, crimson, 'lighten', 40px)