cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <main>
  <h1>Demonstrating Insufficient Browser Default Focus Styles</h1>
  <p>
    The default browser focus styling is often hard to see against different background colors and textures. In those cases, it likely fails <a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-visible.html">WCAG 2.0 – 2.4.7 Focus Visible (AA)</a>.
  </p>
  <p>
    The link above demonstrates this thanks to the background color on this page. There is also <a href="http://codepen.io/aardrian/pen/NAvPzL?editors=1100">version demonstrating this with a background texture</a>.
  </p>
  <p>
    This is not limited to links, but also affects buttons and other controls:
  </p>
  <p>
    <button>I am a button</button>
  </p>
  <p>
    This example is used in the post <a href="http://adrianroselli.com/2017/02/avoid-default-browser-focus-styles.html"><cite>Avoid Default Browser Focus Styles</cite></a>.
  </p>
</main>
            
          
!
            
              @import url(http://fonts.googleapis.com/css?family=Lato:400,700);
body {
  background-color: #4D90FE;
  color: #000;
  font-family: Lato, Arial, sans-serif;
  font-size: 120%;
}

main {
  margin: 0 1em;
}

a {
  color: #000;
}

button {
  font-size: 100%;
  font-family: Lato, Arial, sans-serif;
  border: .1em solid #000;
  border-radius: .2em;
  font-weight: bold;
  padding: .5em;
  text-align: center;
  width: 100%;
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console