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

              
                header.diagonal
  h1 Post Title
.container
  h3 Section Header
  p Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
  
  blockquote The public is more familiar with bad design than good design. It is, in effect, conditioned to prefer bad design, because that is what it lives with. The new becomes threatening, the old reassuring.
    cite ~ Paul Rand
  
  p Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque felis. Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.
  
  
  h3 Section Header
  p Praesent dapibus, neque id cursus faucibus, tortor neque egestas auguae, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
  
  p Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.
  
  
  h3 Section Header
  p Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque felis. Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.
  
  p Praesent dapibus, neque id cursus faucibus, tortor neque egestas auguae, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
  
  p Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.
              
            
!

CSS

              
                // Color Variables
$background: #fff
$color: #00CC8F

// Basic Page CSS
body, html
  background: $background
  color: #333
  font-size: 20px
  line-height: 1.8em
  margin: 0
  overflow-x: hidden
  padding: 0
  
h1, h2, h3, h4, h5, h6
  color: #1a1a1a
  line-height: 1.2em
  margin: 2.1em 0 0.7em
  
h1
  font-size: 2em
h2
  font-size: 1.8em
h3
  font-size: 1.6em
h4
  font-size: 1.4em
h5
  font-size: 1.2em
h6
  font-size: 1em
  
a
  color: #00B881

.container
  max-width: 960px
  padding: 0 6em 3em

// Featured Image CSS
.diagonal
  position: relative
  width: 100%
  background: url("https://unsplash.it/1920/1080?image=901") no-repeat
  background-attachment: fixed
  background-size: cover
  color: $background
  display: flex
  height: 52vh
  justify-content: center

  &:before
    content: ''
    position: absolute
    top: 0
    right: 0
    bottom: 0
    left: 0
    background: rgba(0, 0, 0, 0.5)

  &:after
    content: ''
    position: absolute
    right: -10px
    bottom: -1px
    border-left-color: $background
    border-left-style: solid
    border-left-width: calc(100vw + 10px) 
    border-top: 12vw solid transparent
  
  h1
    color: $background
    display: flex
    position: relative
    justify-content: center
    align-items: center
    height: 100%
    margin-top: -1em
    
// Blockquote CSS
blockquote
  border-left: 3px solid $color
  color: #1a1a1a
  font-family: Georgia, Times, "Times New Roman", serif
  font-size: 1.25em
  font-style: italic
  line-height: 1.8em
  margin: 1.1em -4em
  padding: 1em 2em
  position: relative
  transition: .2s border ease-in-out
  z-index: 0
  &:before
    content: ""
    position: absolute
    top: 50%
    left: -4px
    height: 2em
    background-color: $background
    width: 5px
    margin-top: -1em
  &:after
    content: "\f35f"
    position: absolute
    top: 50%
    left: -0.5em
    color: $color
    font-family: "Ionicons"
    font-style: normal
    line-height: 1em
    text-align: center
    text-indent: -2px
    width: 1em
    margin-top: -0.5em
    transition: .2s all ease-in-out, .4s transform ease-in-out
  &.format:before, &.format:after
    display: none
  &.book:after
    content: "\f12e"
  &.podcast:after
    content: "\f32d"
  &.lyrics:after
    content: "\f333"
  &.favorite:after
    content: "\f384"
  &:active:after
    transform: rotateY(360deg)
    
  cite
    display: block
    font-size: 0.75em
    line-height: 1.8em
    margin-top: 1em
    
// Media Queries
@media (max-width: 1200px)
  body, html
    font-size: 18px
    
@media (max-width: 980px)
  body, html
    font-size: 16px
  .container
    max-width: 720px
    padding: 0 3em 3em
  blockquote
    font-size: 1.1em
    margin: 1.1em -2em
    
@media (max-width: 767px)
  body, html
    font-size: 16px
  .container
    padding: 0 2em 3em
  blockquote
    border-top: 2px solid $color
    border-bottom: 2px solid $color
    border-left: none
    margin: 1.5em 0
    padding: 1.5em 1em
    &:before
      left: 50%
      top: 0
      height: 4px
      margin-top: -3px
      margin-left: -1em
      width: 2em
    &:after
      font-size: 0.75em
      left: 50%
      top: 0
      margin-top: -0.5em
      margin-left: -0.5em
    
    cite
      text-align: right
      
// Scrollbar Exploration
//html::-webkit-scrollbar-track
//  background-color: #e5e5e5
//html::-webkit-scrollbar-thumb
//  background-color: #a6a6a6
//html::-webkit-scrollbar
//  width: 10px
              
            
!

JS

              
                // Nope
              
            
!
999px

Console