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 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.


                .stars.js-plaxify{"data-xrange" => 60, "data-yrange" => 60}
.moon.js-plaxify{"data-xrange" => 20, "data-yrange" => 20}



                @mixin crater($size)
  position: absolute
  width: $size
  height: $size
  border-radius: 50%
  background: #bbb
  box-shadow: inset ($size * -.1) ($size * .05) 0 0 #aaa

  width: 100%
  height: 100%
  margin: 0
  padding: 0
  background: #15294e
  overflow: hidden
  position: absolute
  top: 10%
  right: 25%
  width: 200px
  height: 200px
  border-radius: 50%
  background: #ddd
  box-shadow: inset 20px -10px 0 0 #b9b9b9

    @include crater(60px)

    top: 30px
    right: 30px

    @include crater(20px)

    top: 80px
    right: 100px

    @include crater(30px)

    top: 110px
    right: 60px

  position: absolute
  top: 0
  left: 0
  right: 0
  bottom: 0
  width: 100%
  height: 100%

    position: absolute
    background: #f8f4a2
    border-radius: 50%



                var $sky = $(".stars");

var skyHeight = $sky.innerHeight(),
    skyWidth = $sky.innerWidth();
    numberOfStars = (skyWidth * skyHeight) / 10000;
for (var i = 0; i < numberOfStars; i++) {
  var starSize = Math.floor((Math.random() * 8) + 2),
      starTop = Math.floor(Math.random() * skyHeight),
      starLeft = Math.floor(Math.random() * skyWidth);
  $('<div class="star">').css({
    width: starSize,
    height: starSize,
    top: starTop,
    left: starLeft