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

              
                <link href="https://fonts.googleapis.com/css?family=Ultra|Playfair+Display" rel="stylesheet">

<div class="wrap">
   <div class="content">
       <h1>Bloody Habits</h1>
       <hr>
       <h2><span>December</span></h2>
       <ul>
         <li>13rd. Torino</li>
         <li>15th. Milano</li>
         <li>16th. Verona</li>
         <li>18th. Trento</li>
         <li>19th. Bolzano</li>
       </ul>
       <div class="yeah">
         Free<br>entry!
       </div>
   </div>
</div>
              
            
!

CSS

              
                $col-start = #F71636
$col-end = #ff0041

html,
body
    height 100%
    margin 0
    padding 0
    background #326
    color #fff
    font-family 'Playfair Display', serif

.wrap
  display table
  margin 0 auto
  width 420px
  height 595px
  box-shadow 0px 0px 33px #111
  border 3px double #fff

.content
  position relative
  background linear-gradient(to bottom, $col-start 0%, $col-end 100%)
  display table-cell
  text-align center
  vertical-align middle
  
  h1
    font-family 'Ultra', serif
  h2
    span
      border-bottom 1px solid #222
      padding 3px
  hr
    padding 0
    border none
    border-top medium double #fff
    color #fff
    text-align center

  hr:after
    content "666"
    display inline-block
    position relative
    top -0.7em
    font-size 1.5em
    padding 0 0.25em
    background $col-start
    border medium double #fff
ul
  padding 0
  margin 0
  li
    list-style-type none
    padding 3px
    margin 0
    
.yeah
  position absolute
  bottom 0
  right 0
  width 92px
  height 92px
  margin 36px
  background #222
  display flex
  align-items center
  justify-content center
  border-radius 50%
  transform rotate(-0.125turn)
  border 4px solid #fff
              
            
!

JS

              
                /*
Inspired by: 
- Uncle Acid and the deadbeats flyer - tour 2015

Source:
- https://css-tricks.com/examples/hrs/
*/
              
            
!
999px

Console