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 is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <div class="frame">
  <div class="center">

		<input type="checkbox" id="pretty-checkbox">
		<label for="pretty-checkbox"></label>


                // Change this font size and watch me grow
body {
	font-size: 100%;

// The box in which we live
.frame {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 400px;
	height: 400px;
	margin-top: -200px;
	margin-left: -200px;
	border-radius: 2px;
	box-shadow: 4px 8px 16px 0 rgba(0, 0, 0, 0.1);
	overflow: hidden;
	background-color: #ff0188;

// Used to center many things
.center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);

// STEP 1
$cb: cubic-bezier(0.17, 0.67, 0.83, 0.67);
$checkbox-size: 1.5em;

// selecting/styling our checkbox 
// and label for the normal and :checked states
input[type="checkbox"] {
	// display: none;
	@extend .center;
	opacity: 0;
	// visibility: hidden;  // makes keyboard events (spacebar) not work
	pointer-events: none;

	& + label {
		@extend .center;
		width: $checkbox-size;
		height: $checkbox-size;
		border-radius: 50%;
		border: solid 2px white;
		cursor: pointer;
		box-shadow: 1px 1px 1px 1px rgba(3, 79, 32, 0.5);
		transition: box-shadow 0.4s $cb, background 0.4s $cb;

	// on :checked, give a background of purple and add an inner box-shadow of white (transitioned above)
	&:checked + label {
		background-color: purple;
		box-shadow: 1px 1px 1px 1px rgba(3, 79, 32, 0.5), 0 0 0 5px white inset;


                // jQuery v3.3.1 is supported