Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              link(href='https://fonts.googleapis.com/css?family=Oxygen:400,300,700' rel='stylesheet' type='text/css')
link(href='https://code.ionicframework.com/ionicons/1.4.1/css/ionicons.min.css' rel='stylesheet' type='text/css')

      input(type="text", id="name", placeholder="Username")
      input(type="password", id="pass", placeholder="Password")
    input(type="checkbox", name="remember", id="remember")
    label(for="remember", class="radio") Stay Logged In
    input(type="submit", value="Login")
              vendor(prop, args)
  -webkit-{prop} args
  -moz-{prop} args
  {prop} args

font_color = #fff
ui_accent = #538a9a
gradient_start = #4e7a89
graident_end = #2e3441

html, body
  min-height: 100%
  font-family: Oxygen
  font-weight: 300
  font-size: 1em
  color: font_color

  background: graident_end
  background-image: -webkit-radial-gradient(top, circle cover, gradient_start, graident_end 80%)
  background-image: -moz-radial-gradient(top, circle cover, gradient_start, graident_end 80%)
  background-image: -o-radial-gradient(top, circle cover, gradient_start, graident_end 80%)
  background-image: radial-gradient(top, circle cover, gradient_start, graident_end 80%)
  -webkit-font-smoothing: antialiased
  -moz-osx-font-smoothing: grayscale

  avatar_size = 100px
  profile_padding = 20px
  display: block
  position: relative
  width: 250px
  margin: 20px auto
  padding: profile_padding
  background-color: rgba(0,0,0, 0.1)
  vendor(border-radius, 5px)
  shadows = inset 1px 1px 0 0 rgba(255,255,255, 0.2), inset -1px -1px 0 0 rgba(0,0,0, 0.2)
  vendor(box-shadow, shadows)

    width: avatar_size
    height: avatar_size
    margin: 0 auto 35px auto
    border: 5px solid #fff
    vendor(border-radius, 100%)
    vendor(pointer-events, none)

      content: "\f272"
      text-align: center
      font-family: Ionicons
      display: block
      height: 100%
      line-height: avatar_size
      font-size: 5em

    position: relative

      position: absolute
      top: 12px
      left: 10px

        color: ui_accent
        opacity: 0.4
        vendor(transition, opacity 300ms 0 ease)

  input[type="text"], input[type="password"]
    padding: 10px 12px 10px 32px
    display: block
    width: 100%
    margin-bottom: 10px
    border: 1px solid rgba(255,255,255, 0.5)
    background-color: rgba(255,255,255, 1)
    color: #333
    font-size: 1em
    font-weight: 300
    outline: none
    vendor(border-radius, 5px)
    vendor(transition, border-color 300ms 0 ease)
    vendor(box-sizing, border-box)

    &:focus + label:before
      opacity: 1

    -webkit-appearance: none
    height: 40px
    padding: 10px 12px
    margin-bottom: 10px
    background-color: ui_accent
    text-transform: uppercase
    color: #fff
    border: 0px
    float: right
    margin: 0
    outline: none
    vendor(border-radius, 5px)

      background-color: lighten(ui_accent, 5)

      background-color darken(ui_accent, 5)

// Checkbox Styling
dot_container_width = 30px
dot_container_height = 16px
dot_height_difference = 4px
font_offset = 2px

  display: none

  & + label
    position: relative
    padding-left: 36px
    font-size: 0.6em
    font-weight: normal
    line-height: dot_container_height
    opacity: 0.8
    text-transform: uppercase
    vendor(user-select, none)

    &:before, &:after
      content: ""
      position: absolute
      display: block
      height: dot_container_height
      vendor(border-radius, 30px)

      left: 0
      top: 0 - font_offset
      width: dot_container_width
      background: rgba(0,0,0,0.3)
      vendor(box-shadow, inset 1px 1px 1px 1px rgba(0,0,0,0.3))

      opacity: 0.3
      background: #fff
      top: (dot_height_difference / 2) - font_offset
      left: (dot_height_difference / 2)
      height: dot_container_height - dot_height_difference
      width: dot_container_height - dot_height_difference
      vendor(transition, all 200ms 0 ease)

input[type="checkbox"]:checked + label
  opacity: 1

    opacity: 1
    left: dot_container_width - (dot_container_height - dot_height_difference) - (dot_height_difference / 2)

.cf:before, .cf:after
  content: " "
  display: table
  clear: both
  *zoom: 1

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.