Pen Settings



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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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.


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.


	h1.material-title Material Design Checkbox
	label.material-checkbox-label(for="checkbox") Toggle Me
	input.material-checkbox#checkbox2(checked, type="checkbox")
	label.material-checkbox-label(for="checkbox2") Already Toggled
	input.material-checkbox#checkbox3(type="checkbox", disabled)
	label.material-checkbox-label(for="checkbox3") Disabled


                // demo styles
	font-family -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
	margin 5%

// variables
$materialCheckboxSize ?= 0.5em
$materialCheckboxColour ?= transparentify(black, 0.54)
$materialCheckboxBorderWidth ?= 0.2em
$materialCheckboxBorderRadius ?= $materialCheckboxBorderWidth
$materialCheckboxCheckedIcon ?= url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")
$materialCheckboxCheckedBackground ?= #3f51b5

// helpers
	cursor not-allowed
	opacity 0.5

// the real deal
	font-size 1.8em
	margin 1em 0
	appearance none
	cursor pointer
	border 0.15em solid currentColor
	color $materialCheckboxColour
	padding $materialCheckboxSize
	border-radius $materialCheckboxBorderRadius
	display inline-block
	vertical-align middle
	transition 0.4s ease background, 0.1s ease transform
	position relative
		content ""
		transition inherit
		position absolute
		width 100%
		height 100%
		transform scale(0)
		background $materialCheckboxCheckedBackground - 15
		opacity 0.4
		border-radius 50%
		transform-origin 100% 100%
		background $materialCheckboxCheckedBackground $materialCheckboxCheckedIcon
		@extend $disabled
		& + label
			@extend $disabled
			transform scale(2)
		display inline-block
		vertical-align middle
		cursor pointer