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
  p(style="font-style: italic;") Fade out text without hiding things with gradients, aka trying out a dodgy hack for a nice visual effect
  p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tristique est a neque consequat hendrerit. Etiam tellus ante, bibendum sed nulla sit amet, dictum hendrerit arcu. Suspendisse eget volutpat nunc. Praesent ullamcorper blandit magna, porttitor accumsan turpis tempor id. Quisque eget lobortis ante. Maecenas sodales condimentum mollis. Curabitur scelerisque risus quam, sit amet bibendum magna dignissim vitae. Ut ac dapibus nibh. Fusce sit amet lorem tristique erat hendrerit imperdiet.
  p Integer eu est sed justo malesuada scelerisque nec eu quam. Suspendisse felis odio, porta in massa vitae, dictum sollicitudin turpis. Fusce sollicitudin pulvinar rutrum. Phasellus ac imperdiet sapien, vel tempus nisi. Donec odio elit, fringilla quis posuere eu, eleifend ac elit. Donec gravida interdum diam sit amet scelerisque. Quisque convallis metus mauris, volutpat volutpat sem hendrerit vel. Fusce pulvinar sapien lorem, sit amet sollicitudin massa ornare vel. Curabitur orci mauris, tempor sit amet nibh a, varius dignissim ex.
              
            
!

CSS

              
                @import compass

$text-color: darkslategrey

div:not(*:root) /* from browserhacks.com for webkit */
  background: linear-gradient(0deg, rgba($text-color, 0), $text-color 15em, $text-color)
  background-size: contain
  -webkit-background-clip: text
  -webkit-text-fill-color: transparent
div
  color: $text-color
  font-family: Lucida Sans Unicode, Verdana, sans-serif
  font-size: 15px
  max-width: 500px
  max-height: 100%
  margin: 0 auto
  

html
  min-height: 100% 
body
  height: 100%
  background: linear-gradient(50deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.125) 39%, rgba(0, 0, 0, 0) 40%), linear-gradient(20deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.25) 40%, rgba(255, 255, 255, 0)), linear-gradient(30deg, rgba(103, 90, 107, 0.8) 10%, rgba(127, 116, 135, 0.8) 20%, rgba(138, 138, 138, 0.8) 30%, rgba(166, 171, 181, 0.8) 40%, rgba(162, 207, 201, 0.8) 50%, rgba(167, 214, 214, 0.8) 60%, rgba(164, 213, 209, 0.8) 70%, rgba(169, 202, 215, 0.8) 80%, rgba(154, 187, 223, 0.8) 90%, rgba(154, 181, 223, 0.8) 100%), crimson
  background-size: 105% 105%, 110% 110%, 100% 100%, 125% 125%, 150% 150%
  margin: 2rem
  line-height: 1.3
              
            
!

JS

              
                
              
            
!
999px

Console