Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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

Save Automatically?

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

              
                
.inner
  a.btn href="#modal"
    | Abrir Modal

#modal.modal
  a.modal--close href="#"
    | &times;
  .modal--inner
    h1
      a href="#"
        | Fechar modal
    p
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet vero non consectetur doloribus sapiente. Ipsum accusamus, iure excepturi quasi repellat, debitis fuga, labore, aspernatur cumque dolorem commodi reprehenderit soluta quae!
              
            
!

CSS

              
                html
  font-size: 16px
  box-sizing: border-box
  
*,
::before,
::after
  box-sizing: inherit

html,
body
  height: 100%
  width: 100%
  
body
  text-align: center
  padding: 2em 0 0
  font-size: 1rem
  background-color: #f1f1f1
  color: #434343
  display: table
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif

.inner
  display: table-cell
  vertical-align: middle
  
a
  color: #068
  text-decoration: none

h1
  margin-top: 0
  
.btn
  line-height: 50px
  padding: 0 20px
  color: #fff
  font-size: 1.2rem
  display: inline-block
  font-weight: 300
  text-decoration: none
  border-radius: 3px
  text-transform: uppercase
  cursor: pointer
  background-color: #16a085
  box-shadow: 0 5px 15px #193047
  overflow: hidden
  letter-spacing: .05rem
  transition: box-shadow .1s linear, background-color .1s linear
  
  &:hover
    box-shadow: 0px 2px 10px 5px #1abc9c
    background-color: darken(#16a085, 6%)

.modal
  background-color: rgba(#16a085,.9)
  position: fixed
  z-index: 100
  display: none
  width: 100%
  height: 100%
  top: 0
  left: 0
  right: 0
  bottom: 0
  padding: 3em

  &--close
    position: fixed
    top: 10px
    right: 10px
    text-decoration: none
    color: rgba(255,255,255,.5)
    font-size: 2.6rem
  
  &--inner
    max-width: 600px
    background-color: #fff
    margin: 0 auto
    padding: 2em
    border-radius: 5px
    transform: translateY(-100%)
    transition: all 2s ease-in-out .2s
    box-shadow: 0 6px 20px rgba(#000, .2)
  
  &:target
    display: block

    .modal--inner
      animation: animateModal .2s ease-in-out
      animation-fill-mode: forwards
    

@keyframes animateModal
  from
    transform: translateY(-100%)
  to
    transform: translateY(0)
    
              
            
!

JS

              
                // ===================================
// Created by nandomoreira.me
// https://nandomoreira.me/about
// ===================================

              
            
!
999px

Console