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.


                <div class="container">

There is text below, but all you should see is a black 16x16 square created using the :after pseudo element.

<div class="item hide-text">This text is hidden, but I can still show things like background and pseudo elements.</div>

<div class="border">
  <div class="item">You should be able to see this text, but there should be blank space below because the next line is visually hidden...</div>
  <div class="item visually-hidden">Hide only visually, but have it available for screen readers.</div>


                @mixin hide($accessible: false) {

  @if $accessible != true {
    color: transparent;
    font: 0/0 a;
    text-shadow: none;
  @else {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;

    &.focusable:focus {
      clip: auto;
      height: auto;
      margin: 0;
      overflow: visible;
      position: static;
      width: auto;

.container {
  width: 50%;
  padding: 30px;
  margin: 20px auto;

.hide-accessible {
   @include hide(true);

.hide-all {
   @include hide();

.item {
  margin-bottom: 20px;

.border {
  border: 1px solid #000;

.hide-text {
  @include hide();
  height: 16px;
  &:after {
     content: " ";
     display: block;
     height: 16px;
     width: 16px;
     background-color: black;

.visually-hidden {
  @include hide(true);