cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

              $red: #fd1a15
$green: #007177
$btnWidth: 116px
$switchWidth: 300px
$switchHeight: 130px
$padding: 7px

  box-sizing: border-box

html, body
  height: 100%

  display: flex
  align-items: center
  justify-content: center

  display: none

.checkbox + label
  display: inline-block
  position: relative
  width: $switchWidth
  height: $switchHeight
  background: linear-gradient(to right, $red 0, #fc8b34 45%, #7fd03e 55%, $green 100%) 0 0
  background-size: (($switchWidth * 2) + 50) 100%
  border-radius: 70px
  padding: $padding
  cursor: pointer
  transition: all 500ms ease
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.2) inset
    content: 'Off'
    width: $btnWidth
    height: $btnWidth
    position: absolute
    left: $padding
    top: $padding
    border-radius: 100%
    background: #fff
    text-align: center
    line-height: ($switchHeight - ($padding * 2))
    font-family: 'Cabin', sans-serif
    font-size: 35px
    font-weight: bold
    color: $red
    letter-spacing: 3px
    text-transform: uppercase
    transition: left 500ms ease, color 500ms ease, transform 150ms ease
      transform: scale(0.95)

.checkbox:checked + label
  background-position-x: -($switchWidth + 50)
    content: 'On'
    color: $green
    left: ($switchWidth - $btnWidth - $padding)
Loading ..................