cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


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.

              <h3>SCSS Color Shades</h3>
<div class="half">
	<p class="lighten0">Lighten (0)</p>
	<p class="lighten1">Lighten (1)</p>
	<p class="lighten2">Lighten (2)</p>
	<p class="lighten3">Lighten (3)</p>
	<p class="lighten4">Lighten (4)</p>
<div class="half">
	<p class="darken0">Darken (0)</p>
	<p class="darken1">Darken (1)</p>
	<p class="darken2">Darken (2)</p>
	<p class="darken3">Darken (3)</p>
	<p class="darken4">Darken (4)</p>
              // General
body { text-align:center; }
p { width:100%; color: white; font-weight:bold; display:block; padding:1em 0; margin:0; }
.half { width:50%; float:left; }

// Establish color collection variable
$alert-colors: (
	'good' : #14ab00,     // green
	'warning' : #d4aa00,  // amber/yellow
	'error' : #c50000,    // red

// Alert color variable function
@function alert-color($alert-key: 'good') {
	@return map-get($alert-colors, $alert-key);

// Set incremental tint value
$color-interval: 20% !global;

// Lighten function
@function alert-color-lighten($alert-color-name: 'good', $alert-level: 0) { // alert-color-lighten('good',2)
	$alert-color: alert-color($alert-color-name);
	$alert-color-base: white;
	@return mix($alert-color-base, $alert-color, $alert-level * $color-interval);

// Darken function
@function alert-color-darken($alert-color-name: 'good', $alert-level: 0) { // alert-color-darken('good',2)
	$alert-color: alert-color($alert-color-name);
	$alert-color-base: black;
	@return mix($alert-color-base, $alert-color, $alert-level * $color-interval);

.lighten0 {
	background-color: alert-color-lighten('good',0);
.lighten1 {
	background-color: alert-color-lighten('good',1);
.lighten2 {
	background-color: alert-color-lighten('good',2);
.lighten3 {
	background-color: alert-color-lighten('good',3);
.lighten4 {
	background-color: alert-color-lighten('good',4);
.darken0 {
	background-color: alert-color-darken('good',0);
.darken1 {
	background-color: alert-color-darken('good',1);
.darken2 {
	background-color: alert-color-darken('good',2);
.darken3 {
	background-color: alert-color-darken('good',3);
.darken4 {
	background-color: alert-color-darken('good',4);
Loading ..................