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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


                mixin strip(x)
    - let i = -1;
    while i++ < x
      .number= i



                number-size = 4vmin

lighter = #f9fbfd
light = #dfe6f6
bg = #C4D2EF
dark = #a9bee8
primary = #3e6ccb

neo-thickness = number-size/4

  background-color light
    -1*neo-thickness -1*neo-thickness 2*neo-thickness -0.5*neo-thickness lighter, 
    neo-thickness neo-thickness 2*neo-thickness dark

  box-sizing border-box
  padding 0
  margin 0
  font-family: 'Roboto Mono', monospace
  font-size number-size
  min-height 100vh
  display grid
  overflow hidden
  place-items center
  background linear-gradient(-45deg, bg, light)
.hr, .min, .sec
  display grid
  grid-template-columns 1fr 1fr
  grid-gap number-size
  grid-row 1/2
  align-items start
  user-select none
  width number-size*2
  height @width
  display grid
  place-items center
  color lighter
  transition all 500ms 100ms ease
  border-radius 50%
    color primary
    font-weight bold
    transform scale(1.3)
  transition transform 500ms ease-in-out
  border-radius (number-size/3)
   display grid
   grid-template-columns repeat(3, 1fr)
   grid-gap number-size*2
   height number-size
   position relative
   padding 0 number-size


                const strips = [...document.querySelectorAll(".strip")];
const numberSize = "8"; // in rem

// highlight number i on strip s for 1 second
function highlight(strip, d) {
    .querySelector(`.number:nth-of-type(${d + 1})`)

  setTimeout(() => {
      .querySelector(`.number:nth-of-type(${d + 1})`)
  }, 950); // causes ticking

function stripSlider(strip, number) {
  let d1 = Math.floor(number / 10);
  let d2 = number % 10;

  strips[strip].style.transform = `translateY(${d1 * -numberSize}vmin)`;
  highlight(strip, d1);
  strips[strip + 1].style.transform = `translateY(${d2 * -numberSize}vmin)`;
  highlight(strip + 1, d2);

setInterval(() => {
  // get new time
  const time = new Date();

  // get h,m,s
  const hours = time.getHours();
  const mins = time.getMinutes();
  const secs = time.getSeconds();

  // slide strips
  stripSlider(0, hours);
  stripSlider(2, mins);
  stripSlider(4, secs);

  // highlight numbers
}, 1000);