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 class="pun"></div>
              
            
!

CSS

              
                /* colors */
$gray: #333333;
$blue: #3F87CF;
$bg: lighten($blue, 20%);

/* Presets */
body {
  height: 100vh;
  width: 100vw;
  position: relative;
  background-color: $bg;
}

div:before, div:after {
  display: block;
  content: '';
  position: absolute;
}

div.pun {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
      
      /*flash*/
    linear-gradient(lighten($gray, 50%) 0vmin, lighten($gray, 40%) 8vmin, transparent 7vmin) calc(50% - 17vmin) 26.5vmin / 8vmin 2.5vmin no-repeat, 
      
      /* dials-r */
    radial-gradient(circle, 
      lighten($gray, 50%)  0vmin, lighten($gray, 40%)  1vmin, transparent 1vmin) calc(50% + 2vmin) 25vmin / 2vmin 2vmin no-repeat,  
    radial-gradient(circle, 
      lighten($gray, 50%)  0vmin, lighten($gray, 40%)  1vmin, transparent 1vmin) calc(50% + 5vmin) 25vmin / 2vmin 2vmin no-repeat,  
    radial-gradient(circle, 
      lighten($gray, 50%)  0vmin, lighten($gray, 40%)  1vmin, transparent 1vmin) calc(50% + 8vmin) 25vmin / 2vmin 2vmin no-repeat,  
      
      /*flash*/
    linear-gradient(lighten($gray, 20%) 0vmin, lighten($gray, 10%) 4vmin, transparent 20vmin) calc(50% + 16vmin) 24vmin / 10vmin 5vmin no-repeat, 
      
      /* knobs */
      linear-gradient(155deg, $gray 3vmin, transparent 3vmin) calc(50% - 10vmin) 23.5vmin / 6vmin 2vmin no-repeat,
    linear-gradient($gray 4vmin, $gray 20vmin, transparent 20vmin) calc(50% - 18vmin) 23.5vmin / 6vmin 2vmin no-repeat, 

      /* notch*/
      linear-gradient(155deg, $bg 3vmin, transparent 3vmin) calc(50% - 7vmin) 22vmin / 6vmin 6vmin no-repeat,
    linear-gradient(135deg, $bg 2vmin, transparent 2vmin) calc(50% - 23vmin) 24vmin / 4vmin 4vmin no-repeat,
    linear-gradient($bg 4vmin, $bg 20vmin, transparent 20vmin) calc(50% - 20vmin) 20.5vmin / 20vmin 5vmin no-repeat,  

      /* lens */
    radial-gradient(circle, 
      $gray  0vmin,
      darken($gray, 40%) 3vmin,
      darken($gray, 40%) 4.5vmin,
      lighten($gray, 75%) 4.5vmin,
      lighten($gray, 75%) 7vmin,
      darken($gray, 40%) 7vmin,
      darken($gray, 40%) 10vmin,
      lighten($gray, 50%) 10vmin,
      lighten($gray, 60%) 12vmin,
      transparent 12vmin) 50% 28vmin / 25vmin 25vmin no-repeat,  
      
      /* base*/
      
    radial-gradient(ellipse, 
      transparent  1vmin, $gray 1vmin, $gray 2vmin, transparent 2vmin) calc(50% + 25vmin) 30vmin / 6vmin 4vmin no-repeat, 
    radial-gradient(ellipse, 
      transparent  1vmin, $gray 1vmin, $gray 2vmin, transparent 2vmin) calc(50% - 25vmin) 30vmin / 6vmin 4vmin no-repeat,  
    linear-gradient($gray 4vmin, darken($gray, 10%) 20vmin, transparent 20vmin) 50% 30vmin / 50vmin 25vmin no-repeat,  
  radial-gradient(ellipse, lighten($gray, 80%) 4vmin, lighten($gray, 60%) 34vmin, transparent 28vmin) 50% 23vmin / 50vmin 29vmin no-repeat;
}


div.pun:before {
    width: 70vmin;
    height: 30vmin;
    display: flex;
    justify-content: center;
    align-items: end;
    content: 'I thought I would have a photographic memory... but I never developed it';
    font-family: 'Fuzzy Bubbles', cursive;
    font-size: 3vmin;
    text-align: center;
}
              
            
!

JS

              
                /* Today may be my favorite day of #divtober as I can not get enough of these cheesy puns. Today's art wasn't breaking new ground for my learning CSS, just a compliment to the chosen pun. There is a time-lapse video of this on Youtube at https://youtu.be/zZ5FvOXoe2k */
              
            
!
999px

Console