Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                .loader
	.bubble
		.bubble__shine.bubble__shine--lg
		.bubble__shine.bubble__shine--sm
	p.text 
		| Lo
		span.text__highlight a
		| din
		span.text__highlight g
              
            
!

CSS

              
                :root {
	// COLOR CSS VARIABLES
	--c_01: #ff1ead; // Pink
	--c_02: #000; // Black
	--c_03: #fff; // White

	// SIZE VARIABLES
	--size: 12vmin; // Resize loader by only editing this variable. With vmin unit, loader is automatically responsive.
	--loader_w: calc(var(--size) * 6);
	--loader_h: calc(var(--size) * 2.3);
	--bubble: calc(var(--size) * 1.5);
	--shine: calc(var(--size) / 5);
}

// MIXINS
@mixin size($w, $h: $w) {
	width: $w;
	height: $h;
}

// LAYOUT
body {
	background-color: var(--c_02);
}

.loader {
	@include size(var(--loader_w), var(--loader_h));
	display: flex;
	justify-content: center;
	position: relative;
	margin: calc(50vh - var(--loader_h)) auto 0;
}

.bubble {
	@include size(var(--bubble));
	animation: blow 1.6s linear alternate infinite;
	background-color: var(--c_01);
	border-radius: 50%;
	position: absolute;
	bottom: calc(var(--size) / 1.5);
	left: 50%;
	transform: scale(0.5) translateY(50%);
	outline: 1px solid transparent; // Fixes Chrome jagged edges

	&__shine {
		background-color: var(--c_03);
		position: absolute;

		&--lg {
			@include size(var(--shine), calc(var(--shine) * 2.5));
			border-radius: 100% 50% 40% 100% / 50% 30% 30% 100%;
			top: 2%;
			left: 26%;
			transform: rotateZ(60deg);
		}

		&--sm {
			@include size(calc(var(--shine) / 2));
			border-radius: 50% 50% 40% 100% / 50% 50% 50% 100%;
			top: 32%;
			left: 9%;
		}
	}
}

.text {
	align-self: flex-end;
	color: var(--c_01);
	font-family: "Major Mono Display", monospace;
	font-size: var(--size);
	margin: 0;
	text-transform: uppercase;

	&__highlight {
		color: var(--c_03);
	}
}

// ANIMATION
@keyframes blow {
	0% {
		transform: scale(0.5) translateY(50%);
	}
	20% {
		transform: scale(0.6) translateY(33%);
	}
	40% {
		transform: scale(0.7) translateY(21%);
	}
	60% {
		transform: scale(0.8) translateY(12%);
	}
	80% {
		transform: scale(0.9) translateY(5%);
	}
	93%, 100% {
		transform: scale(1) translateY(0) translateZ(0);
	}
}

              
            
!

JS

              
                /* 
 * PURE CSS BUBBLE GUM LOADER
 * Responsive simple loader for #CodePenChallenge Color Pop. 
 * Resizable loader with just 1 CSS edit.
 * By ilithya | 2019
 */
              
            
!
999px

Console