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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                main
  article.background-image
  
    h1.page-title Calibration theme
    span.page-subtitle Minimalism to the power of maximum.
    
    p
      span.text-in.delay-1 After almost 10 years of client's work,
      br
      span.text-in.delay-20 we have crafted our first own product.
      
    p
      span.text-in.delay-50 This is a clean and minimalistic WP theme,
      br
      span.text-in.delay-70 created for artists, photographers, bloggers
      br
      span.text-in.delay-100 and everyone who loves simplicity.
      
    p.actions
      a.button(href="https://demo.mobilemarkup.com/calibration/" target="_blank") Demo
      a.button(href="https://demo.mobilemarkup.com/downloads/calibration.zip" target="_blank") Download

              
            
!

CSS

              
                // Thanks to @oChursin for making this photo available freely on @unsplash 🎁 https://unsplash.com/photos/vaPoJZB9Mzg

$phone: 480px // 30rem
$mobile: 640px // 40rem
$tablet: 800px // 50rem
$desktop: 1020px
$laptop: 1260px
$screen: 1600px // 100rem
$widescreen: 2000px // 125 rem

html
  -moz-osx-font-smoothing: grayscale
  -webkit-font-smoothing: antialiased
  text-rendering: optimizelegibility

body
  font-family: 'Montserrat', 'HelveticaNeueLTStd', "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif
  line-height: 1.5
  min-width: 320px
  
  background: black
  color: white
  padding: 1rem
  @media (max-width: $phone)
    padding: 1rem 0

article
  padding: calc(1rem + 2vw) 1rem
  text-align: center

  color: white
  text-shadow: 0 1px 2px rgba(black,.5)

  display: flex
  flex-flow: row wrap
  align-items: center
  align-content: center
  justify-content: center
  > *
    width: 100%
  

.background-image
  position: relative
  background: url('https://source.unsplash.com/vaPoJZB9Mzg/1200x800') no-repeat center top
  @media (min-width: 1000px)
    background-image: url('https://source.unsplash.com/vaPoJZB9Mzg/2400x1600')
  background-size: 0
  border-radius: .25rem
  overflow: hidden
  min-height: calc(100vh - 2rem)
  box-sizing: border-box

  &:before, &:after
    content: ''
    position: absolute
    top: 0
    right: 0
    bottom: 0
    left: 0
    z-index: -1
    background: inherit
    background-size: cover
    border-radius: 10px
    opacity: 0
    transition: all 2s cubic-bezier(0.230, 1.000, 0.320, 1.000) .5s
    will-change: transform, opacity

    @media (orientation: landscape)
      background-size: 130% auto

  &:before
    transform: scale(1.125)

  &:after
    transform: scale(.875)


  .time-is-out.loaded-image &, html:not(.first-time) .loaded-image &
    &:before, &:after
      transform: scale(1)
      opacity: 1


.text-in, .page-title, .page-subtitle, .button
  transition: opacity .6s, transform .6s
  will-change: opacity, transform
  
  html:not(.first-time) &
    transition-delay: 0s!important

.text-in
  opacity: 0
  .loaded-document &
    opacity: 1

.page-title, .page-subtitle, .button
  transition: opacity 1s cubic-bezier(0.230, 1.000, 0.320, 1.000) .5s, transform 1s cubic-bezier(0.230, 1.000, 0.320, 1.000) .5s
  .time-is-out.loaded-image &, html:not(.first-time) .loaded-image &
    opacity: 1
    transform: translate(0,0)

@each $i in 1 20 50 70 100
  .delay-#{$i}
    transition-delay: #{$i/10}s

.page-title
  text-align: center
  margin-bottom: .25em
  font-size: calc(1.5rem + 1.5vw)
  line-height: 1.125
  opacity: 0
  transform: translate(0,-25%)

.page-subtitle
  display: block
  font-size: 12px
  opacity: 0
  transform: translate(0,25%)
  @media (min-width: $mobile)
    font-size: 14px

p
  font-size: 14px
  @media (min-width: $mobile)
    font-size: 16px
  @media (min-width: $desktop)
    font-size: 18px 
  margin: 1em auto
  text-align: center


.page-subtitle + p
  margin-top: calc(1rem + 4vw)

.actions
  margin-top: calc(2rem + 6vw)


.button
  position: relative
  padding: .75em 2em
  border: 1px solid white
  border-radius: .25em
  text-decoration: none
  color: inherit
  letter-spacing: .1em
  box-shadow:  0 1px 1px 0px rgba(black,.25)

  display: inline-block

  &:hover
    background: white
    color: black
    text-shadow: none

  &:active
    position: relative
    top: 1px
    box-shadow:  0 0px 1px 0px rgba(black,.25)
  opacity: 0
  transform: translate(-10%, 0)

  + .button
    transform: translate(10%, 0)
    margin-left: calc(1rem + 4vw)
    
    &:before
      content: '* Release candidate'
      position: absolute
      top: 100%
      left: 0
      font-size: 11px
      margin: .75em
      color: white!important
      pointer-events: none



              
            
!

JS

              
                document.addEventListener "DOMContentLoaded", ->
  document.body.classList.add('loaded-document')

texts = document.querySelectorAll('.text-in')
element = texts[texts.length - 1]

for event in ['webkitTransitionEnd','oTransitionEnd', 'transitionend', 'msTransitionEnd']
  element.addEventListener event, ->
    document.body.classList.add('time-is-out')  
  
img = new Image()
img.onload = ->
  document.body.classList.add('loaded-image')
img.src = getComputedStyle(document.querySelector('.background-image')).backgroundImage.slice(4, -1).replace(/"/g, "")


              
            
!
999px

Console