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

              
                - var boxes = 10

.container
  - for(var i = 0; i < boxes; i++)
    .box

              
            
!

CSS

              
                // Focus on this, you can change this values too.
$width: 200px
$height: 200px
$boxes: 10
$animation__container: true
$animation__box: true
$animation__duration: 10s
  
.container
  position: absolute
  width: $width
  height: $height
  top: 50%
  left: 50%
  transform: translate(-50%, -50%)
  
  @if $animation__container == true
    animation: $animation__duration rotate-container infinite ease-in-out alternate

.box
  position: absolute
  border: 1px solid #8C9EFF
  width: $width
  height: $height
  will-change: transform
  
  @if $animation__box == true
    animation: $animation__duration rotate-square ease-in infinite alternate
  
  @for $i from 1 through $boxes
    &:nth-child(#{$i})
      $current: $i * (90 / $boxes) * 1deg
      --current: #{$current}
      transform: rotate(var(--current))
  
      @keyframes rotate-square
        0%, 20%
          transform: none
        70%
          transform: rotate(var(--current))
          
@keyframes rotate-container
  0%
    transform: translate(-50%, -50%) rotate(0deg)
  100%
    transform: translate(-50%, -50%) rotate(720deg)
  
  
// IGNORE THIS!
body
  position: relative
  height: 100vh
  background-color: #0E1B38
              
            
!

JS

              
                
              
            
!
999px

Console