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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

  %svg(viewbox="0 0 560 260")
        %feGaussianBlur(in="SourceAlpha" stdDeviation="3")
        %feOffset(dx="0" dy="0" result="offsetblur")
          %feFuncA(slope="0.2" type="linear")
      %path#dataset-3.dataset(d="M0,260 C0,260 4,252 7,252 C66,252 90,102 139,102 C188,102 205,135 252,135 C299,135 309,89 330,89 C350,89 366,122 404,122 C442,122 431,98 451,98 C470,98 499,213 560,260 L0,259 Z")
      %path#dataset-2.dataset(d="M0,260 C35,254 63,124 88,124 C114,124 148,163 219,163 C290,163 315,100 359,100 C402,100 520,244 560,259 C560,259 0,259 0,260 Z")
      %path#dataset-1.dataset(d="M0,260 C0,260 22,199 64,199 C105,199 112,144 154,144 C195,144 194,126 216,126 C237,126 263,184 314,184 C365,183 386,128 434,129 C483,130 511,240 560,260 L0,260 Z")

  Credit the awesome work of Virgil Pana
  %a(href="https://dribbble.com/shots/2025084") dribbble.com/shots/2025084
              @import url("https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css")
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,700")

$green: #50E3C2
$blue: #21A6EE
$purple: #807CCC
$navy: #384051
$dot-color: fade-out(white, 0.9)
$text-color: fade-out(white, 0.7)

  background: $navy
  color: $text-color
  font-family: "Montserrat", sans-serif
  width: 560px
  margin: 9em auto 3em auto
  text-align: center
  font-size: 0.75em
  text-decoration: none
  color: $blue

  color: #EC4989

  position: relative
  width: 560px
  height: 260px
  margin: 3em auto
  background-image: repeating-radial-gradient(center center, $dot-color, $dot-color 2px, transparent 2px, transparent 100%)
  background-size: 29px 29px
  background-position: -11px 11px

  display: inline-block
  font-size: 0.875em

  display: inline-block
  position: absolute
  left: -3.5em
  top: -5px
  content: "$4k \A $3k \A $2k \A $1k \A 0"
  white-space: pre
  height: 100%
  line-height: 4.2
  text-align: right

  content: "07:00h 21:00h"
  width: 110%
  margin-left: -5%
  word-spacing: 36.5em
  padding-top: 0.5em

  fill-opacity: 0.8
  filter: url(#dropshadow)

  fill: $green

  fill: $blue

  fill: $purple

.chart button
  position: relative
  top: -0.75em
  border: none
  background: fade-out(white, 0.5)
  color: $navy
  border-radius: 5px
  padding: 0.25em 1em
  font-size: 1em
  float: right
  cursor: pointer
    outline: none

//---------------------- animations
@keyframes raise 
    transform: scaleY(0.01)
    transform: scaleY(1.1)
    transform: scaleY(1)

  transform-origin: bottom
  transform: scaleY(0.01)
  opacity: 0.5

.loaded .dataset 
  opacity: 1
  animation: raise 0.5s ease 0.2s forwards

.loaded #dataset-1 
  animation-delay: 0.2s

.loaded #dataset-2 
  animation-delay: 0.1s

.loaded #dataset-3 
  animation-delay: 0s
              load_chart = () ->
  setTimeout( () ->
  , 500)

$(".js-do-it-again").on "click", () ->
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.