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.


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.




                $cyan: cyan;

html{  background: #101010;}

div {   // <==== Change this to the HTML element you are wanting to apply it to 

  border: 0;
  box-sizing: border-box;
  margin: 0;
  height: 100vh; // <==== Dont forget to to set height to something
  padding: 1em 2em;

  // Using inset box-shadow instead of border for sizing simplicity
  font-size: inherit;
  font-weight: 700;

  // Required, since we're setting absolute on pseudo-elements
  position: relative;
  vertical-align: middle;

  &::after {
    box-sizing: inherit;
    content: '';
    position: absolute;
     width: 0;
    height: 0;

.draw {
  transition: color 0.25s;

  &::after {
    // Set border to invisible, so we don't see a 4px border on a 0x0 element before the transition starts
    border: 2px solid transparent;
    width: 100%;  // <==== Change this from 0 to 100%
    height: 100%;  // <==== Change this from 0 to 100%

  // This covers the top & right borders (expands right, then down)
  &::before {
    top: 0;
    left: 0;
    border-top-color: $cyan; // Make borders visible
    border-right-color: $cyan;
    transition:                 //<==== Move Transition items from :hover::before to here 
      width 0.25s ease-out,
      height 0.25s ease-out 0.25s; 

  &::after {
    bottom: 0;
    right: 0;
    border-bottom-color: $cyan; 
    border-left-color: $cyan;
    transition:                      //<==== Move Transition items from :hover::after to here 
      border-color 0s ease-out 0.5s, 
      width 0.25s ease-out 0.5s, 
      height 0.25s ease-out 0.75s;