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.


	<section class="section-1">
		<h2>Section One</h2>
	<section class="section-2">
		<h2>Section Two</h2>
	<section class="section-3">
		<h2>Section Three</h2>
	<section class="section-4">
		<h2>Section Four</h2>
	<section class="section-5">
		<h2>Section Five</h2>
	<section class="section-6">
		<h2>Section Six</h2>
	<section class="section-7">
		<h2>Section Seven</h2>
	<section class="section-8">
		<h2>Section Eight</h2>
	<section class="section-9">
		<h2>Section Nine</h2>
	<section class="section-10">
		<h2>Section Ten</h2>
	<section class="section-11">
		<h2>Section Eleven</h2>
	<section class="section-12">
		<h2>Section Twelve</h2>


                $maxOpacity: 1.0;
$minOpacity: 0.5;
$steps: 10; // Total number of steps to reach max

// Start demo setup
@mixin checkered-background {
	background: {
		color: #eee;
		image: url('data:image/svg+xml,<svg xmlns="" width="400" height="400" fill-opacity=".25"><rect x="200" width="200" height="200" /><rect y="200" width="200" height="200" /></svg>');
		size: 30px 30px;
@mixin demo_setup {
	html, * {
		font-family: sans-serif;

	body {
		@include checkered-background;

	section {
		background-color: rgb(193, 17, 170);
		margin: 0.5rem;
		height: 10vh;
		position: relative;

	h2	{
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		text-align: center;
		color: white;
		width: 100%;
		left: 0;
		font-size: 1rem;
// End Demo Setup
@include demo_setup;

section {
	opacity: $minOpacity;
	transition: opacity 0.5s;

	// Hover effect so visitors can see the
	// item they're interacting with
	&:hover {
		opacity: $maxOpacity;	
.section {
	// First item is maximum opacity
	&-1 {
		opacity: $maxOpacity;

	// Iterate through the itermediate items
	@for $i from 2 to ($steps + 1) {
		&-#{$i} {
			opacity: $maxOpacity - ($i * ($minOpacity/$steps));