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

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


                - let cols = [
- 	'#26e0ec, #bf4fd9', 
- 	'#ffda5f, #f9376b', 
- 	'#feb6b7, #6148c0', 
- 	'#00ecac, #3b5fe9', 
- 	'#fe3ea3, #6c41ac'
- ];
- let btns = {
- 	'comments': 'πŸ—¨οΈ', 
- 	'settings': 'βš™οΈ', 
- 	'profile': 'πŸ‘±', 
- 	'search': 'πŸ”', 
- 	'like': 'πŸ–€', 
- 	'delete': 'πŸ—‘οΈ', 
- 	'purchase': 'πŸ›’', 
- 	'ok': 'βœ”οΈ', 
- 	'cancel': '❌', 
- 	'attach': 'πŸ“Ž', 
- 	'favourites': '⭐', 
- 	'location': 'πŸ“', 
- 	'book now': 'πŸ‘†', 
- 	'registration': '✏️', 
- 	'learn more': '❯', 
- 	'login': 'πŸ”’', 
- 	'subscribe': 'πŸ””', 
- 	'home': '🏠', 
- 	'microphone': 'πŸŽ™οΈ', 
- 	'play now': 'ᐅ'
- };
- let m = cols.length;
- let opts = [
- 	'Simple Chrome-only (non-standard) solution', 
- 	'Extra pseudo cross-browser solution', 
- 	'No pill rounding solution'
- ];
- let n = opts.length;

- for(let i = 0; i < n; i++)
		h3 #{opts[i]}
		- for(let p in btns)
			- let idx = ~~(Math.random()*m)
			button(data-ico=btns[p] style=`--slist: ${cols[idx]}`) #{p}


                $b: .25em;

* { margin: 0; padding: 0; font: inherit }

body, section, button { display: grid }

body {
	grid-gap: 3em;
	margin: 0;
	height: 100vh;
				#000 0 1em, #111 0 2em);
	font: 900 .75em ubuntu, sans-serif

section {
	grid-gap: 2em .75em;
	grid-template-columns: repeat(auto-fit, 12em);
	place-content: center;

h3 {
	grid-column: 1/ -1;
	color: #eee;
	font: 2rem/ 1.25em z003, segoe scrpt, comic sans ms, cursive;
	text-align: center;

button {
	--full: linear-gradient(red 0 0);
	--grad: linear-gradient(to right bottom, var(--slist));
	grid-gap: .5em;
	grid-auto-flow: column;
	place-self: center;
	border: solid $b transparent;
	padding: 1em 1.5em;
	border-radius: 9em;
	background: var(--grad) border-box;
	-webkit-text-fill-color: transparent;
	font: inherit;
	text-transform: uppercase;
	:nth-child(1) > & {
		-webkit-mask: var(--full) text, var(--full) padding-box, var(--full);
		-webkit-mask-composite: xor;
	:nth-child(2) > & {
		position: relative;
		-webkit-background-clip: text;
						background-clip: text;
		&::before {
			position: absolute;
			inset: -$b;
			border: inherit;
			border-radius: inherit;
			background: inherit;
			background-clip: border-box;
			-webkit-mask: var(--full) padding-box, var(--full);
			-webkit-mask-composite: xor;
							mask: var(--full) padding-box exclude, 
			content: ''
	:nth-child(3) > & {
		border-image: var(--grad) 1;
		-webkit-background-clip: text;
						background-clip: text;
		clip-path: inset(0 round $b)
	&::after { content: attr(data-ico) }


Exeplained in my CSS-ing Candy Ghost Buttons article on CSS-Tricks - check it out for details!