Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

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


Auto Save

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.


                <button class="button">
  Wow! Such :hover!


                /** Created by Dave Lunny in the beautiful year 2015
  * | @dave_lunny

// Just some global resets nothing to see here...
* { box-sizing: border-box; font-family: "Roboto", Helvetica, Arial, sans-serif; text-align: center; &:focus { outline: none; } }
html, body { height: 100%; margin: 0; padding: 0; }

//  The gradient animation mixin
//  The most up to date version can be found here:
.gradient-animation( @start, @end, @transTime ){
  background-size: 100%;
  background-image: -webkit-linear-gradient(@start, @end);
  background-image: linear-gradient(@start, @end);
  position: relative;
  z-index: 100;
  &:before {
    border-radius: inherit;
    background-image: -webkit-linear-gradient(@end, @start);
    background-image: linear-gradient(@end, @start);
    content: '';    
    display: block;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
    z-index: -100;
    -moz-transition: opacity @transTime ease-in-out;
    -webkit-transition: opacity @transTime ease-in-out;
    transition: opacity @transTime ease-in-out;
  &:hover {
     &:before {
       opacity: 1; 

//  actual style of my element. This may be a bit different for you
.button {
  .gradient-animation( #fff, #ccc, 0.45s );// gradient animation mixin usage
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0.45rem;
  border: 1px solid #ddd;
  cursor: pointer;
  color: #333;
  display: inline-block;
  font-size: 1rem;
  font-weight: 300;
  padding: 0.725rem 0.975rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  &:active { // not part of the mixin, I just wanted to add for dramatic effect
     &:before {
       opacity: 0; 
  @media all and (min-width: 480px){
    font-size: 1.25rem;
    padding: 1rem 1.5rem;

// Now I'm going to try applying it to the body element
body {
  .gradient-animation( #F9D423, #FF4E50, 2.75s );  
  // Thanks to this service for the gradient color choice: