cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <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>
</div>
  
</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:active,
    &.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);
}
            
          
!
999px
Loading ..................

Console