Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <p>
  Drag the following link to your Bookmarks bar to create a bookmarklet to change your cursor to 24×24 pixels square for testing the proposed WCAG 2.2 Target Size requirement (ref: <a href="https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html" target="_top">Understanding Success Criterion 2.5.8: Target Size (Minimum)</a>).
</p>
 
<p>
  <a href="javascript:(function(){var d=document,id='AAR24pxBkmklt',el=d.getElementById(id),f=d.querySelectorAll('iframe'),i=0,l=f.length;if(el){function removeFromShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.getElementById(id).remove();removeFromShadows(el.shadowRoot);}}}el.remove();if(l){for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementById(id).remove();removeFromShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}}removeFromShadows(d);}else{s=d.createElement('style');s.id=id;s.appendChild(d.createTextNode(%27*{ cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYAgMAAACdGdVrAAAACVBMVEUAAAAAAAD///+D3c/SAAAAAXRSTlMAQObYZgAAACtJREFUCNdjCAUDhqxVQLCSIYEBCDgJUIwOOCnG0FAHKIVfJWGLoE6COhAAxmsXhSV+DZoAAAAASUVORK5CYII=) 12 12, auto !important}%27));function applyToShadows(root){for(var el of root.querySelectorAll('*')){if(el.shadowRoot){el.shadowRoot.appendChild(s.cloneNode(true));applyToShadows(el.shadowRoot);}}}d.getElementsByTagName('head')[0].appendChild(s);for(i=0;i<l;i++){try{f[i].contentWindow.document.getElementsByTagName('head')[0].appendChild(s.cloneNode(true));applyToShadows(f[i].contentWindow.document);}catch(e){console.log(e)}}applyToShadows(d);}})();">24×24 Cursor</a>
</p>
<p>
  Note that the new SC is still in flux and may not even be a square when done. Follow the <a href="https://github.com/w3c/wcag/issues?q=is%3Aissue+is%3Aopen+label%3A%222.5.8+Target+Size+%28Min%29%22" target="_top">GitHub discussions</a> for updates.
</p>
<p>
  This is a fork and improvement of my <a href="https://codepen.io/aardrian/pen/eYZWNyv" target="_top">44×44 bookmarklet</a> (which was based on Jared Smith's <a href="https://codepen.io/jared_w_smith/pen/vYGXeMy" target="_top">44x44 bookmark</a>). To remove the cursor, activate the bookmarklet again. Thanks to Pat for the suggestion to adapt his own <a href="https://codepen.io/patrickhlauke/pen/PopGBdE" target="_top">focus outline bookmarklet</a> (adapted from Steve's <a href="https://codepen.io/stevef/pen/YLMqbo" target="_top">text spacing bookmarklet</a> from work by Pat and Jon Gibbins) which allows it to toggle on and off and to work in one level of nested iframes, such as this empty one:
</p>
<iframe></iframe>
<p>
  Note your browser's Content Security Policy may prevent the script from modifying a page, in which case you can run it in the browser console. In Firefox use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>K</kbd>, In Chrome use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>J</kbd>.
</p>
              
            
!

CSS

              
                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  /*   line-height: 1.5; */
  /*   letter-spacing: 0.12em; */
  /*   word-spacing: 0.16em; */
}

iframe {
  width: 90vw;
  height: 4em;
}
              
            
!

JS

              
                // document.onkeydown = function(evt) {
//   evt = evt || window.event;
//   var isEscape = false;
//   if ("key" in evt) {
//     isEscape = evt.key == "Escape" || evt.key == "Esc";
//   } else {
//     isEscape = evt.keyCode == 27;
//   }
//   if (isEscape) {
//     var a=document.createElement('style'),b;
//     document.head.appendChild(a);
//     b=a.sheet;
//     b.insertRule('*{cursor:revert !important}',0);
//   }
// };

// document.onkeydown=function(e){var n;("key"in(e=e||window.event)?"Escape"==e.key||"Esc"==e.key:27==e.keyCode)&&(n=document.createElement("style"),document.head.appendChild(n),n.sheet.insertRule("*{cursor:revert !important}",0))};
              
            
!
999px

Console