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

              
                <html>
  <body>
    <h1>Shadows in a design system</h1>
    <h2>1.- Tailwindscss</h2>
    <div class="framework">
    <div class="shadow box">.shadow</div>
    <div class="shadow-md box">md</div>
    <div class="shadow-lg box">lg</div>
    <div class="shadow-xl box">xl</div>
    <div class="shadow-2xl box">2xl</div>
    <div class="shadow-inner box">.inner</div>
    <div class="shadow-outline box">.outline</div>
    </div>
    <h2>2.- Polaris</h2>
    <div class="framework">
      <div class="box faint">.faint</div>
      <div class="box base">.base</div>
      <div class="box deep">.deep</div>
      <div class="box layer">.layer</div>
    </div>
    <h2>3.- Bootstrap</h2>
    <div class="framework">
      <div class="box bootstrap-sm">.sm</div>
      <div class="box bootstrap">.sm</div>
      <div class="box bootstrap-lg">.sm</div>
    </div>
    <h2>4.- Material design</h2>
    <div class="framework">
      <div class="box mdc-elevation--z1">1dp</div>
      <div class="box mdc-elevation--z2">2dp</div>
      <div class="box mdc-elevation--z3">3dp</div>
      <div class="box mdc-elevation--z4">4dp</div>
      <div class="box mdc-elevation--z5">5dp</div>
      <div class="box mdc-elevation--z6">6dp</div>
      <div class="box mdc-elevation--z7">7dp</div>
      <div class="box mdc-elevation--z8">8dp</div>
      <div class="box mdc-elevation--z9">9dp</div>
      <div class="box mdc-elevation--z10">10dp</div>
      <div class="box mdc-elevation--z11">11dp</div>
      <div class="box mdc-elevation--z12">12dp</div>
      <div class="box mdc-elevation--z13">13dp</div>
      <div class="box mdc-elevation--z14">14dp</div>
      <div class="box mdc-elevation--z15">15dp</div>
      <div class="box mdc-elevation--z16">16dp</div>
      <div class="box mdc-elevation--z17">17dp</div>
      <div class="box mdc-elevation--z18">18dp</div>
      <div class="box mdc-elevation--z19">19dp</div>
      <div class="box mdc-elevation--z20">20dp</div>
      <div class="box mdc-elevation--z21">21dp</div>
      <div class="box mdc-elevation--z22">22dp</div>
      <div class="box mdc-elevation--z23">23dp</div>
      <div class="box mdc-elevation--z24">24dp</div>
    </div>
    <h2>5.- Carbon design system</h2>
    <div class="framework">
      <div class="box layer-types__layer-0">Base</div>
      <div class="box layer-types__layer-1">Flat</div>
      <div class="box layer-types__layer-2">Raised</div>
      <div class="box layer-types__layer-8">Overlay</div>
      <div class="box layer-types__layer-12">Sticky nav</div>
      <div class="box layer-types__layer-16">Temporary nav</div>
      <div class="box layer-types__layer-24">Pop-out</div>
    </div>
  </body>
</html>
              
            
!

CSS

              
                body{padding:30px;}
.box{
  width:80px; 
  height:80px; 
  padding:10px;
  margin-right:30px;
  margin-bottom:30px;
  border-radius:8px;
  font-size:16px;
  font-family: arial;
  display:flex;
  justify-content:center;
  align-items:center;
  
}
.framework{
  display:flex;
  justify-content:left;
  flex-wrap: wrap;
}

h1{padding-top:20px; font-family:arial;}
h2{padding-top:20px; font-family:arial;}


/* Tailwindscss */
.shadow	{box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);}
.shadow-md	{box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);}
.shadow-lg	{box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);}
.shadow-xl	{box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);}
.shadow-2xl	{box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);}
.shadow-inner	{box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);}
.shadow-outline	{box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);}
.shadow-none	{box-shadow: none;}
    

/* Polaris */
.faint{ box-shadow: 0 1px 0 0 rgba(22, 29, 37, 0.05)}
.base{ box-shadow: 0 0 0 1px rgba(63, 63, 68, 0.05),0 1px 3px 0 rgba(63, 63, 68, 0.15)}
.deep{ box-shadow: 0 0 0 1px rgba(6, 44, 82, 0.1),0 2px 16px rgba(33, 43, 54, 0.08)}
.layer{ box-shadow:0 31px 41px 0 rgba(32, 42, 53, 0.2),0 2px 16px 0 rgba(32, 42, 54, 0.08)}

/* Bootstrap */
.bootstrap-sm{box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;}
.bootstrap{box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important}
.bootstrap-lg{box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important}

/*Material design */
.mdc-elevation--z1{-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.mdc-elevation--z2{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mdc-elevation--z3{-webkit-box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12)}.mdc-elevation--z4{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.mdc-elevation--z5{-webkit-box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12);box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.mdc-elevation--z6{-webkit-box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mdc-elevation--z7{-webkit-box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.mdc-elevation--z8{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mdc-elevation--z9{-webkit-box-shadow:0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12);box-shadow:0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12)}.mdc-elevation--z10{-webkit-box-shadow:0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12);box-shadow:0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12)}.mdc-elevation--z11{-webkit-box-shadow:0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12);box-shadow:0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12)}.mdc-elevation--z12{-webkit-box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12);box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mdc-elevation--z13{-webkit-box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12)}.mdc-elevation--z14{-webkit-box-shadow:0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12);box-shadow:0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12)}.mdc-elevation--z15{-webkit-box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12);box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12)}.mdc-elevation--z16{-webkit-box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mdc-elevation--z17{-webkit-box-shadow:0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12);box-shadow:0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12)}.mdc-elevation--z18{-webkit-box-shadow:0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12);box-shadow:0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12)}.mdc-elevation--z19{-webkit-box-shadow:0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12);box-shadow:0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12)}.mdc-elevation--z20{-webkit-box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12);box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12)}.mdc-elevation--z21{-webkit-box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12);box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12)}.mdc-elevation--z22{-webkit-box-shadow:0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12);box-shadow:0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12)}.mdc-elevation--z23{-webkit-box-shadow:0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12);box-shadow:0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12)}.mdc-elevation--z24{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}

/* Carbon */
  .layer-types__layer-0 {
    box-shadow: none; }
  .layer-types__layer-1 {
    box-shadow: none; }
  .layer-types__layer-2 {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1); }
  .layer-types__layer-8 {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1); }
  .layer-types__layer-12 {
    box-shadow: 0 6px 12px 0 rgba(0, 0, 0, 0.1); }
  .layer-types__layer-16 {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1); }
  .layer-types__layer-24 {
    box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1); }


              
            
!

JS

              
                
              
            
!
999px

Console