Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <div role="img" aria-label="Cartoon of a carved pumpkin"></div>
              
            
!

CSS

              
                html {
  margin: 0;
  height: 100%;
  background: linear-gradient(#fecc calc(50% + 13vmin), #cdbc 0);
}

div {
  font-size: 1vmin;
  width: 50em;
  height: 40em;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* the next two lines are optional */
  background: radial-gradient(50% 5% at 50% 95%, #0002, #0001 99%, #0000);
  afilter: drop-shadow(1em 0) drop-shadow(-1em 0) drop-shadow(0 1em) drop-shadow(0 -1em);
  
  &::before {
    content: "";
    position: absolute;
    width: 15%;
    height: 40%;
    background: 
      radial-gradient(130% 84% at 40% 100%, #0002 50%, #0000 0),
      radial-gradient(at 100% 0%, #fff3 20%, #0000 0),
      radial-gradient(farthest-side at 100% 50%, #0000 40%, green 0 73%, #0000 0),
      
      radial-gradient(at 42% 38%, #0002 20%, #0000 0),
      radial-gradient(farthest-side at 100% 50%, #0000 40%, green 0);
    left: 52%;
    top: -7%;
    transform: translate(-50%, -50%);
    border-radius: 100% 30% 40% 0;
  }
  
  &::after {
    content: "";
    position: absolute;
    top: -2%;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      /* eyes */
      radial-gradient(circle at 30% 50%, #210 8%, #0000 8.25%),
      radial-gradient(circle at 29% 50%, #000 8%, #0000 8.25%),
      radial-gradient(circle at 70% 50%, #210 8.25%, #0000 8.5%),
      radial-gradient(circle at 69% 50%, #000 8.25%, #0000 8.5%),
      /* mouth */
      radial-gradient(50% 150% at 50% 0, orange 99%, #0000) 44% 69% / 6% 8% no-repeat,
      radial-gradient(110% 50% at 50% 57%, orange 20%, #0000 20.5%),
      radial-gradient(farthest-side at 50% 0, #210 99%, #0000 0) 50% 75% / 30% 15% no-repeat,
      /* base + shadows */
      radial-gradient(22% 50% at 51% 50%, orange 99%, #0000 0),
      radial-gradient(20% 50% at 51% 55%, darkorange 99%, #0000 0),
      radial-gradient(21% 50% at 51% 45%, darkorange 99%, #0000 0),
      radial-gradient(30% 50% at 40% 51%, orange 99%, #0000 0),
      radial-gradient(30% 50% at 39% 57%, darkorange 99%, #0000 0),
      radial-gradient(31% 50% at 42% 45%, darkorange 99%, #0000 0),
      radial-gradient(28% 50% at 61% 50%, orange 99%, #0000 0),
      radial-gradient(29% 52% at 61% 48%, darkorange 99%, #0000 0),
      radial-gradient(27% 54% at 61% 52%, darkorange 99%, #0000 0),
      radial-gradient(58% 43% at 37% 51%, orange 99%, #0000 0),
      radial-gradient(38% 43% at 75% 52%, orange 99%, #0000 0);
    border-radius: 100% / 140% 120% 90% 80%;
    -webkit-mask:
      radial-gradient(22% 50% at 51% 50%, #000 99%, #0000 0),
      radial-gradient(30% 50% at 40% 51%, #000 99%, #0000 0),
      radial-gradient(28% 50% at 61% 50%, #000 99%, #0000 0),
      radial-gradient(58% 43% at 37% 51%, #000 99%, #0000 0),
      radial-gradient(38% 43% at 75% 52%, #000 99%, #0000 0);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console