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.


                <h4>A button with slanted borders, and a slanty fill.  The slanty bits are made from CSS gradients.<br>Use the mixin and make one for yourself!
<button class="fancy-button">Hover me, baby</button>
Relies on a magic number, if you're smarter than me and can figure out how to get rid of that, then you get a 🌟</h6>


                @import url(,700);
$master-font-size: 30px;
$color1: #5bf390;
$color2: #ff4cff;
$border-width: 0.3em;
$padding: 1em 1.5em;
//There's some relationship between border width, padding, and angle 
//that a smarter person than me must figure out, until then, long live $magic-number!  
$magic-number: 41.6%;

@mixin slanty-button($border-width, $padding, $color1, $color2, $magic-number) {
  background-repeat: no-repeat;
    linear-gradient(-60deg, $color2 0%, $color2 $magic-number, $color1 $magic-number, $color1 100%),
    linear-gradient(-60deg, $color2 0%, $color2 calc(100% - #{$magic-number}), $color1 calc(100% - #{$magic-number}), $color1 100%);
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-size: 100% $border-width, 100% $border-width, calc(100% + #{$border-width*2}) 100%, 100% calc(100% + #{$border-width*2});
  border: none;
  border-left: $border-width solid $color1;
  border-right: $border-width solid $color2;
  padding: $padding;
  overflow: hidden;
  position: relative;

  &:hover, &:active {
    &:before, &:after {
      transform: translateX(0);
  &:before, &:after {
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-repeat: no-repeat;
    background-size: 100% calc(100% - #{$border-width*2});
    background-position: 50% $border-width;
    transition: all 0.4s;
  &:before {
    background-image: linear-gradient(-60deg, transparent 0%, transparent 50%, $color1 50%, $color1 100%);
    transform: translateX( calc(-100% + #{$magic-number}) );
  &:after {
    background-image: linear-gradient(120deg, transparent 0%, transparent 50%, $color2 50%, $color2 100%);
    transform: translateX(calc(100% - #{$magic-number}));
.fancy-button {
  @include slanty-button($border-width, $padding, $color1, $color2, $magic-number);
  font-size: 1em;
  margin-bottom: 1em;
  transition: all 0.4s;
  &:hover {
    color: white;

//scene setting
html {
  font-size: $master-font-size;
  font-family: 'Lato', 'brandon grotesque', 'gotham', futura, helvetica, sans-serif;
  padding: 1em;
  text-align: center;
//button reset
button {
  appearance: none;
  background-color: transparent;
  border: none;
  font-family: 'Lato', 'brandon grotesque', 'gotham', futura, helvetica, sans-serif;
  outline: none !important;
h4 {
  margin-bottom: 1em;
h6 {
  font-size: 0.6em;