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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              <div class="bear"></div>
            
          
!
            
              html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  font-size: 1vmin;
  background: linear-gradient(to bottom right, white 50%, #eee 50%);
}

.bear {
  position: relative;
  box-sizing: border-box;
  margin: auto;
  height: 40em;
  width: 40em;
  border-radius: 50%;
  filter:
    // Bear Outline
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%))
    drop-shadow(0 0 1px darken(SaddleBrown, 30%));
  background-color: #222; // Nose
  box-shadow:
    // Shadow
    inset -6em 0 rgba(black, 0.1),
    // Head
    inset 0 11em 0 8em darken(SaddleBrown, 10%),
    // Mouth
    inset 0 0 0 15em SaddleBrown, 
    // Right Inner Ear
    -11.5em -16.5em 0 -16.5em mix(white, lighten(SaddleBrown, 15%), 40%),
    // Right Inner Ear Shadow
    -12em -16em 0 -16em mix(white, lighten(SaddleBrown, 15%), 20%),
    // Right Inner Ear
    12.5em -15.5em 0 -16.5em mix(white, lighten(SaddleBrown, 15%), 40%),
    // Right Inner Ear Shadow
    12em -16em 0 -16em mix(white, lighten(SaddleBrown, 15%), 20%),
    // Right Outer Ear
    -12em -16em 0 -14em darken(SaddleBrown, 15%),
    // Left Outer Ear
    12em -16em 0 -14em darken(SaddleBrown, 15%),
    // Nose Shadow
    inset -5em -29em 0 -10em black;
}

.bear::before,
.bear::after {
  content: '';
  display: block;
  border-radius: 50%;
  background-color: transparent;
  position: absolute;
  z-index: 5;
}

.bear::before {
  height: 10em;
  width: 5em;
  top: 7em;
  left: calc(50% - 2.5em);
  box-shadow:
    // Right Eye Reflection
    -6em 0 0 -2em #333,
    // Right Eye Pupil
    -5.5em 0 0 -1em black,
    // Right Eye
    -5.5em 0 0 0 white,
    // Left Eye Refelction
    5em 0 0 -2em #333,
    // Left Eye Pupil
    5.5em 0 0 -1em black,
    // Left Eye
    5.5em 0 0 0 white, 
    // Mouth-Nose Split
    0 15em 0 -2.5em black
  ;
}

.bear::after {
  height: 10em;
  width: 10em;
  top: 29.5em;
  left: calc(50% - 5em);
  box-shadow:
    // Mouth
    0 -1em 0 -0.75em black,
    // Whisker Left Top
    6em -10em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Left Middle
    8em -8em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Left Bottom
    6em -6em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Right Top
    -6em -10em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Right Middle
    -8em -8em 0 -4.75em darken(SaddleBrown, 5%),
    // Whisker Right Bottom
    -6em -6em 0 -4.75em darken(SaddleBrown, 5%);
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console