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 3D Button with Shading (Experiment)
		button.btn Default
		button.btn.btn-info Information
		button.btn.btn-success Success
		button.btn.btn-warning Warning
		button.btn.btn-error Error
		button.btn.btn-dark Dark
		//- Custom style by setting the prepared variables
		button.btn(style="--color: #ffffff; --background-color: #ff4081; --border-color: #ec407a;") Jelly beans



// IF YOU WANT TO USE THIS STYLE, PLEASE READ THIS                            //
// This is written in SCSS. If you would like to use the CSS, you may compile //
// the code, then use the CSS style on your own project.                      //
// Please take note that the code above the block of comment:                 //
// STYLES RELATED TO EXPERIMENT BUTTONS                                       //
// Is just for the styling of the page. These are not related to the styles   //
// of the buttons. So after compiling to CSS, you may just take the part      //
// on or below the said block of comments.                                    //
// You may also customize the colors of the buttons, or actually add a new    //
// class for the buttons, by editing the $btn-type map before compiling the   //
// source code into CSS.                                                      //

@import url(",400i,700");

body {
	font-family: "Open Sans", sans-serif;
	font-size: 16px;
	background-color: #e2e2e2;
	width: 100vw;
	height: 100vh;
	display: flex;

.card {
	background-color: #ffffff;
	width: calc(100% - 4rem);
	padding: 4rem 2rem;
	border: solid 1px #eaeaea;
	margin: auto;
	border-radius: 2.5rem;
	box-sizing: border-box;
	box-shadow: 0 1rem 2rem rgba(#000000, 0.3);
	h1 {
		text-align: center;
		padding: 0;
		margin: 0;
		margin-bottom: 2rem;
	div {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;

.btn {
	margin-bottom: 0.5rem;
	margin-right: 0.5rem;
	&:last-child {
		margin-right: 0;

@media screen and (min-width: 960px) {
	.card {
		width: calc(960px - 4rem);

/* STYLES RELATED TO EXPERIMENT BUTTONS                                       */

$btn-padding: 0.6rem 0.9rem;
$btn-border-radius: 0.5rem;
$btn-transition-time: 64ms;

// The Map for the CSS class of the buttons
$btn-type: (
	"info": (
		"color": #ffffff,
		"background-color": #0091ea,
	"success": (
		"color": #ffffff,
		"background-color": #00c853,
	"warning": (
		"color": #3e2723,
		"background-color": #ffc400,
	"error": (
		"color": #ffffff,
		"background-color": #d50000,
	"dark": (
		"color": #ffffff,
		"background-color": #303030,

.btn {
	--color: #000000;
	--background-color: #d8d8d8;
	--border-color: darken(#d8d8d8, 7.5%);
  color: var(--color);
	font-family: inherit;
  background-color: var(--background-color);
  padding: $btn-padding;
  border: solid 1px var(--border-color);
	outline: none;
	position: relative;
  border-radius: $btn-border-radius;
	user-select: none;
		0 0.2rem 0.4rem rgba(0, 0, 0, 0.4),
		0 -0.3rem 0.6rem rgba(0, 0, 0, 0.2) inset;
  transition: box-shadow $btn-transition-time ease-out;
	&:after {
		content: "";
		background-color: #ffffff;
		width: 75%;
		height: 12.5%;
		position: absolute;
		top: 0.15rem;
		left: 12.5%;
		border-radius: 50%;
		filter: blur(0.15rem);
		transition: opacity $btn-transition-time ease-out;
	&:active {
			0 0 0 rgba(0, 0, 0, 0.4),
			0 0.4rem 1rem rgba(0, 0, 0, 0.3) inset;
		&:after {
			opacity: 0;

@each $type, $styles in $btn-type {
	.btn-#{$type} {
		@each $style, $value in $styles {
			--#{$style}: #{$value};
			@if ($style == "background-color") {
				--border-color: #{darken($value, 7.5%)};
			&:active {
				@if ($style == "color") {
					--#{$style}: #{darken($value, 7.5%)};