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

              
                .container
  .button.one
    .check
  .button.two
    .check
  .button.three
    .check
  .button.four
    .check
              
            
!

CSS

              
                $light-gray = #E5E5E5
$blue = #00A8FF
$red = #FF605F
$green = #96D100
$purple = #D066FA
$anime-time = .2s
$time-func = cubic-bezier(0,1.05,.72,1.07)

*
  transition all $anime-time $time-func

body
  display flex
  width 100vw
  height 100vh
  justify-content center
  align-items center
  .container
    width 336px
    height 48px
    display flex
    justify-content space-between
    .button
      height 48px
      width 48px
      border-radius 50%
      box-shadow 0px 0px 0px 4px $light-gray inset
      &:hover
        cursor pointer
        box-shadow 0px 0px 0px 4px darken($light-gray, 5) inset
      
.blue
  box-shadow 0px 0px 0px 24px $blue inset !important
  
.red
  box-shadow 0px 0px 0px 24px $red inset !important
  
.green
  box-shadow 0px 0px 0px 24px $green inset !important
  
.purple
  box-shadow 0px 0px 0px 24px $purple inset !important
  
.check
  height 100%
  transform scale(0)
  width 100%
  transition-delay 0.2s
  background url("http://frolovoleg.ru/images/checkmark.svg") center no-repeat
  
              
            
!

JS

              
                $(document).ready ->
  
  resetButton = () ->
    $(".check").css("transform", "scale(0)")
    $(".button").removeClass("blue")
    $(".button").removeClass("red")
    $(".button").removeClass("green")
    $(".button").removeClass("purple")
  
  changeButton = (className, colorName) ->
    $(className).click ->
      resetButton()
      $(@).addClass(colorName)
      $(@).children().css("transform", "scale(1)")
      
  changeButton(".one", "blue")
  changeButton(".two", "red")
  changeButton(".three", "green")
  changeButton(".four", "purple")
    
              
            
!
999px

Console