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.

    - %w(J0MQDN0pokc 4xv3lqnanYc _TC_gkSQ7IU 4vm6v0KmCS8).each do |image|
        %img.fadein.lazyload{:alt => "", 'data-src' => "{image}/800x600", 'src' => "data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D''%20viewBox%3D'0%200%20#{800}%20#{600}'%20%2F%3E", width: 800, height: 600}

    - %w(before after).each do |item|
        %img.fadein.lazyload{:alt => "", "data-srcset" => "{item}.jpg", :src => "data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D''%20viewBox%3D'0%200%20661%20661'%20%2F%3E", width: 661, height: 661}

-# %section
-#   .slider.product
-#     - {none: 'full-no-bg', light: 'full-bg-light', dark: 'full-bg-dark'}.each do |term,image|
-#       %a.slide{href: "{term}", target: '_blank'}
-#         %img.fadein.lazyload{:alt => "", "data-srcset" => "{image}.png", :height => "3156", :src => "data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D''%20viewBox%3D'0%200%202880%203156'%20%2F%3E", :width => "2880"}

  padding: 20px
  box-sizing: border-box
  text-align: center
  @media (min-width: 700px)
    min-height: 100vh
    display: flex
    align-items: center
    justify-content: center
    background-color: black
    background-color: mix(black,white)
  max-width: 100%
  height: auto
  opacity: 0
  transition: opacity .3s ease-in-out

    opacity: 1
  position: relative
  margin: 0 auto
  overflow: hidden
  border-radius: .25rem
  box-shadow: 0 1px 2px 0px rgba(black,.5)
    pointer-events: none
    display: block
      display: block
      transition: all .5s ease
      clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%)
    ~ .slide
      position: absolute
      top: 0
      left: 0
      width: 100%
      height: 100%
      content: ''
      position: absolute
      top: 0
      left: 0
      height: 100%
      z-index: 2
      pointer-events: initial

    @for $i from 2 through 4
        &, & ~ *
            width: percentage(1/$i)

        $s: ''
        @for $j from 1 through $i - 1
          $s: $s + ' + *'
              clip-path: polygon(percentage($j/$i) 0, percentage(($j+1)/$i) 0, percentage(($j+1)/$i) 100%, percentage($j/$i) 100%)
              left: percentage($j/$i)

    .slide img
      clip-path: polygon(0% 0, 0% 0, 0% 100%, 0% 100%)!important

      clip-path: polygon(0% 0, 100% 0, 100% 100%, 0% 100%)!important

    ~ .slide img
      clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%)!important
🕑 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.