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="fake" role="img" aria-label="caricature of Donald Trump saying 'Fake News!'"></div>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&display=swap');
body {
  background: #cef;
}
.fake {
  font-size: 1vmin;
  width: 80em;
  aspect-ratio: 1;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0);
  background: 
    /* hand */
    linear-gradient(#258 0 0) 95% 100% / 19% 10%,
    linear-gradient(#f0f4f8 0 0) 94% 100% / 17% 12%,
    linear-gradient(#fca 0 0) 90% 100% / 8% 14%,
    radial-gradient(farthest-side at 0% 100%, #0000 55%, #000 0 60%, #0000 0) 92.5% 81.25% / 9% 7%,
    radial-gradient(circle at 82% 80%, #fca 2.5%, #0000 0),
    radial-gradient(farthest-side at 0 50%, #fca 90%, #000 0 99%, #0000 0) 88% 78% / 9% 5%,
    
    radial-gradient(80% 50%, #fca 99%, #0000 0) 82.5% 76% / 4% 20%,
    radial-gradient(60% 50%, #f8bc99 99%, #0000 0) 86.5% 76% / 4% 8.5%,
    radial-gradient(60% 50%, #f8bc99 99%, #0000 0) 90.5% 76% / 4% 8%,
    radial-gradient(60% 50%, #f8bc99 99%, #0000 0) 94.5% 76.5% / 4% 7.5%,
    radial-gradient(circle at 86.5% 79%, #fca 7%, #0000 0),
    
    /* hair */
    radial-gradient(farthest-side at 0% 100%, #0000 58%, #ffc 0 60%, #0000 0) 25% 20% / 20% 16%,
    radial-gradient(farthest-side at 100% 30%, #0000 54%, #ffc 0 60%, #0000 0) 20% 23% / 15% 15%,
    radial-gradient(farthest-side at 30% 70%, #0000 53%, #ffc 0 60%, #0000 0) 22% 23% / 15% 15%,
    /* ears */
    radial-gradient(circle at 15% 47%, #fca 5%, #0000 0),
    radial-gradient(circle at 63% 47%, #fca 5%, #0000 0),
    /* neck shirt */
    conic-gradient(#0000 3deg, #fff 0 60deg, #0000 0) 3% 113% / 41% 43%,
    conic-gradient(#0000 303deg, #fff 0 355deg, #0000 0) 57% 116% / 41% 45%,
    /* tie */
    conic-gradient(at 50% 200%, #c00 16deg, #fff0 0 344deg, #c00 0) 33% 84% / 31% 14%,
    conic-gradient(at 50% -140%, #0000 170deg, #b00 0 190deg, #0000 0) 33% 100% / 31% 14%,
    /* shirt */
    conic-gradient(at 50% 250%, #f0f4f8 14deg, #fff0 0 347deg, #f0f4f8 0) 30% 100% / 41% 24%,
    /* suit */
    conic-gradient(at 35% 60%, #0000 66deg, #258 0 187deg, #0000 0) 8% 83% / 31% 31%,
    conic-gradient(at 35% 70%, #0000 46deg, #258 0 154deg, #0000 0) 8% 100% / 31% 20%,
    conic-gradient(at 60% 60%, #0000 170deg, #258 0 294deg, #0000 0) 60% 84% / 42% 30%,
    conic-gradient(at 60% 60%, #0000 200deg, #258 0 314deg, #0000 0) 60% 100% / 42% 20%,
    conic-gradient(at 5% 60%, #0000 66deg, #369 0 186deg, #0000 0) 0 100% / 41% 45%,
    conic-gradient(at 90% 60%, #0000 170deg, #369 0 294deg, #0000 0) 60% 100% / 41% 45%,
    #f000;
  background-repeat: no-repeat;
}

.fake::before {
  content: "";
  width: 50%;
  height: 55%;
  position: absolute;
  top: 50%;
  left: 39%;
  transform: translate(-50%, -50%);
  border-radius: 100% / 125% 125% 90% 80%;
  box-shadow: -5vmin -7vmin 0 -5.5vmin #ffc, 4vmin -7vmin 0 -4.5vmin #ffc;
  background:
    radial-gradient(farthest-side at 100% 100%, #0000 58%, #000 0 60%, #0000 0) 22% 54% / 20% 36%,
    radial-gradient(farthest-side at 0% 100%, #0000 58%, #000 0 60%, #0000 0) 81% 55% / 24% 39%,
    /* nose */
    radial-gradient(5% 10% at 50% 43%, #e94 99%, #0000),
    radial-gradient(circle at 50% 48.5%, #e94 6.5%, #0000 0),
    radial-gradient(circle at 44% 48%, #e94 3.5%, #0000 0),
    radial-gradient(circle at 56% 48%, #e94 3.5%, #0000 0),
    radial-gradient(farthest-side at 50% 0%, #0000 80%, #000 0 99%, #0000 0) 50% 50% / 13.5% 7.4%,
    radial-gradient(farthest-side at 50% 0%, #0000 80%, #000 0 99%, #0000 0) 43.5% 49.5% / 7% 3%,
    radial-gradient(farthest-side at 50% 0%, #0000 80%, #000 0 99%, #0000 0) 56.5% 49.5% / 7% 3%,
    /* eyes */
    radial-gradient(farthest-side, #000 85%, #0000) 25% 32% / 24% 1%,
    radial-gradient(farthest-side, #000 85%, #0000) 75% 32% / 24% 1%,
    radial-gradient(120% 250% at 40% -50%, #0000 55%, #000 0 60%, #0000 0) 27% 39% / 19% 5%,
    radial-gradient(120% 250% at 64% -50%, #0000 55%, #000 0 60%, #0000 0) 73% 39.5% / 19% 5%,
    radial-gradient(#fff6 25%, #0000 0) -13% 20% / 70% 40%,
    radial-gradient(#fff6 25%, #0000 0) 113% 20% / 70% 40%,
    
    /* eyebrows */
    radial-gradient(90% 100% at 55% 100%, #0000 63%, #ffc 0 90%, #0000 0) 25% 20% / 25% 6%,
    radial-gradient(90% 100% at 45% 100%, #0000 63%, #ffc 0 90%, #0000 0) 75% 20% / 25% 6%,
    /* chin*/
    radial-gradient(120% 250% at 50% -50%, #0000 53%, #000 0 60%, #0000 0) 50% 85% / 30% 5%,
    
    radial-gradient(farthest-side at 100% 0%, #0000 53%, #000 0 60%, #0000 0) 68% 88% / 14% 5%,
    radial-gradient(farthest-side at 0% 0%, #0000 53%, #000 0 60%, #0000 0) 31% 87% / 17% 5%,
    /* mouth */
/*     linear-gradient(#fff 0 0) 55% 60.5% / 8% 4.5%, */
    radial-gradient(farthest-side at 50% 100%, #fff 85%, #000 0 99%, #0000) 51% 60% / 12% 4.5%,
    radial-gradient(farthest-side at 50% 0%, #fff 85%, #000 0 99%, #0000) 50.25% 71% / 11% 5%,
    radial-gradient(100% 100% at 120% 55%, #0000 20%, #000 0 99%, #0000) 47.5% 66.25% / 12% 11%,
    radial-gradient(100% 200% at 120% 70%, #0000 30%, #000 0 99%, #0000) 50.6% 64.85% / 12% 7.5%,
    radial-gradient(120% 250% at 47% -50%, #0000 53%, #000 0 60%, #0000 0) 51% 76% / 12% 5%,
    radial-gradient(120% 250% at 50% 150%, #0000 53%, #000 0 60%, #0000 0) 50% 78.5% / 14% 2%,
    /* base */
    radial-gradient(90% 70% at 50% 50%, #fa5 50%, #0000 0),
    radial-gradient(90% 70% at 30% 60%, #fa5 30%, #0000 0),
    radial-gradient(40% 90% at 12% 40%, #fa5 30%, #0000 0),
    radial-gradient(80% 70% at 78% 57%, #fa5 30%, #0000 0),
    radial-gradient(40% 90% at 12% 40%, #fa5 30%, #0000 0),
    linear-gradient(#fa5 50%, #0000 0),
    #fca;
  background-repeat: no-repeat;
}

.fake::after {
  content: "FAKE \a NEWS!";
  font-family: 'Architects Daughter',Helvetica, Arial, sans-serif;
  font-weight: bold;
  line-height: 1;
  white-space: pre;
  text-align: center;
  box-sizing: border-box;
  padding: 0.2em 0 0 7.5em;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0%;
  left: 0%;
  background: 
    radial-gradient(50% 100% at 54% -50%, #ffc 99%, #0000 0) 45% 27% / 55% 14%,
    radial-gradient(50% 100% at 54% 150%, #ffc 99%, #0000 0) 32% 9% / 45% 17%,
    radial-gradient(farthest-side at 0 0, #0000 96%, #000 0 99%, #0000 0) 85% 25% / 20% 20%,
    #f000;
  background-repeat: no-repeat;
  font-size: 7em;
}
              
            
!

JS

              
                
              
            
!
999px

Console