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

Quick-add: + add another resource

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.

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.

  <h2>darken all by 15%</h2>
  <span class="static-1"></span>
  <span class="static-2"></span>
  <span class="static-3"></span>

  <h2>darken dynamically</h2>
  <span class="dynamic-1"></span>
  <span class="dynamic-2"></span>
  <span class="dynamic-3"></span>
              $col_1: #FFED9C;
$col_2: #FF0D00;
$col_3: #2F1787;
@function dynamic-shadow($c){
  @if (lightness($c) >= 70) {
    @return 8%;
  @if (lightness($c) <= 69){
    @return 14%
  @if (lightness($c) <= 30) {
    @return 27%;

@mixin static($c){
  background: $c;
  border-bottom: 20px solid darken($c, 15%);

@mixin dynamic($c){
  background: $c;
  border-bottom: 20px solid darken($c, dynamic-shadow($c));

    family: Calibri, Arial, sans-serif;
    size: 18px;
    weight: 300;
  line-height: 1.3;

  width: 50%;
  margin: 20px auto;

  font-size: 2em;
  text-transform: uppercase;

  width: 100%;
  display: block;
  height: 20px;
  margin-bottom: 10px;

  @include static($col_1);

  @include static($col_2);

  @include static($col_3);

  @include dynamic($col_1);

  @include dynamic($col_2);

  @include dynamic($col_3);

Loading ..................