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

              
                <!-- This demo uses flex grid but you can use float grid too -->

<div class="row">
  <div class="columns">
    <h2>Visibility Classes</h2>
    <p>Show or Hide elements based on screen size or device orientation. You can also use visibility classes to control which elements users see depending on their browsing environment.</p>
    <div class="callout primary">
      <p>Visibility classes use <code>!important</code> to ensure they aren't overriden by more specific selectors. This framework conscientiously avoids using <code>!important</code> declarations. This is one of the few components that does.</p>
    </div>
    <div class="callout warning">
      <p>There are no classes to detect touchscreen devices, as both desktop and mobile browsers inconsistently report touch support. Learn more here: <a href="http://www.stucox.com/blog/you-cant-detect-a-touchscreen/">You Can't Detect a Touchscreen</a></p>
    </div>
  </div>
</div>

<div class="row">
  <div class="columns">
    <p>You are on a small screen or larger.</p>
    <p class="show-for-medium">You are on a medium screen or larger.</p>
    <p class="show-for-large">You are on a large screen or larger.</p>
    <p class="show-for-small-only">You are <em>definitely</em> on a small screen.</p>
    <p class="show-for-medium-only">You are <em>definitely</em> on a medium screen.</p>
    <p class="show-for-large-only">You are <em>definitely</em> on a large screen.</p>

    <p class="hide-for-medium">You are <em>not</em> on a medium screen or larger.</p>
    <p class="hide-for-large">You are <em>not</em> on a large screen or larger.</p>
    <p class="hide-for-small-only">You are <em>definitely not</em> on a small screen.</p>
    <p class="hide-for-medium-only">You are <em>definitely not</em> on a medium screen.</p>
    <p class="hide-for-large-only">You are <em>definitely not</em> on a large screen.</p>
    <p class="hide">Can't touch this.</p>

    <p class="invisible">Can sort of touch this.</p>

    <p class="show-for-landscape">You are in landscape orientation.</p>
    <p class="show-for-portrait">You are in portrait orientation.</p>

    <p class="show-for-sr">This text can only be read by a screen reader.</p>
    <p>There's a line of text above this one, you just can't see it.</p>

    <p aria-hidden="true">This text can be seen, but won't be read by a screen reader.</p>

    <p><a class="show-on-focus" href="#mainContent">Skip to Content</a></p>
    <header id="header" role="banner">
    </header>
    <main id="mainContent" role="main" tabindex="0">
    </main>
  </div>
</div>

              
            
!

CSS

              
                /* Demo Styles */

body {
  padding: 2rem 1rem;
}
              
            
!

JS

              
                $(document).foundation();
              
            
!
999px

Console