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


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


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.





                @import url('')

$timer_unit: 1s
$timer_length: 15
$timer_delay: 1s

$starting_hue: 160
$hue_increment: 360 / $timer_length

@mixin scale_timer($scale)
  $x: $scale
  width: 50vmin * $x
  height: 50vmin * $x
  box-shadow: 0 0 0 (1.25vmin * $x), inset (2.5vmin * $x) (2.5vmin * $x) (5vmin * $x) rgba(black, 0.125), (2.5vmin * $x) (2.5vmin * $x) (5vmin * $x) rgba(black, 0.125)
  font-size: 25vmin * $x
  text-shadow: (2.5vmin * $x) (2.5vmin * $x) (5vmin * $x) rgba(black, 0.125)

  box-sizing: border-box

*, *:before, *:after
  box-sizing: inherit

  height: 100vh
  background-color: hsl($starting_hue, 80, 60)
  font-family: 'Montserrat', sans-serif
  animation: ($timer_unit * $timer_length) ($timer_delay - $timer_unit * 0.125) cubic-bezier(0.9, 0, 0.1, 1) forwards background_color

    @keyframes background_color
      @for $i from 1 through $timer_length + 1
        #{100% / $timer_length * $i}
          $hue: $hue_increment * $i * 2
          background-color: hsl($starting_hue + $hue, 80, 60)

  position: absolute
  top: 50%
  left: 50%
  transform: translate(-50%, -50%)
  display: flex
  align-items: center
  justify-content: center
  overflow: hidden
  color: white
  border-radius: 50%
  font-weight: 700

  @media (min-width: 600px)

    content: '#{$timer_length}'
    animation: ($timer_unit * $timer_length) $timer_delay forwards timer_countdown, $timer_unit ($timer_delay - $timer_unit * 0.125) $timer_length timer_beat

      @keyframes timer_beat
          transform: none
          transform: scale(1.125)

      @keyframes timer_countdown
        @for $i from 0 through $timer_length
          #{100% / $timer_length * $i}
            content: '#{-$i + $timer_length}'

    content: ''
    position: absolute
    top: 0
    left: 0
    z-index: -100
    width: 100%
    height: 100%
    background-color: rgba(black, 0.125)
    animation: ($timer_unit * $timer_length) $timer_delay linear forwards timer_indicator

      @keyframes timer_indicator
          transform: translateY(100%)