Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <main>
  <h1>RFI Style</h1>
  <h2>Building a White + Orange Style</h2>
  <h5 style=text-align:center>This theme is experimental &mdash; and not included in <code>basic.css</code></h5>
  <p><strong>Lorem ipsum dolor sit amet,</strong> consectetur adipisicing elit, <em>sed do eiusmod tempor incididunt</em> ut labore et dolore magna aliqua. <u>Ut enim ad minim veniam</u>, quis nostrud exercitation ullamco <a href=#>laboris nisi ut aliquip</a> ex ea commodo consequat. Duis aute irure dolor in reprehenderit in <code>voluptate</code> velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  <blockquote>
    <p><q>This is a blockquote</q></p>
    <footer>First Last</footer>
  </blockquote>
  <h2>List Test</h2>
  <ul>
    <li>list item
    <li>list item with <a href=#>a link</a>
    <li>list item
  </ul>
  <ol>
    <li>list item
    <li>list item with <a href=#>a link</a>
    <li>list item
  </ol>
  <h4>Button Test</h4>
  <a href=# data-button>default button</a>
  <a href=# data-button="blue">.blue button</a>
  <a href=# data-button="green">.green button</a>
  <a href=# data-button="red">.red button</a>
  <a href=# data-button="grey">.grey button</a>
  <a href=# data-button="outline">.outline button</a>
  <br>
  <a href=# data-button disabled>default button</a>
  <a href=# data-button="blue" class="disabled">.blue button</a>
  <a href=# data-button="green" hidden>.green button</a>
  <a href=# data-button="red" disabled>.red button</a>
  <a href=# data-button="grey" class="disabled">.grey button</a>
  <a href=# data-button="outline" hidden>.outline button</a>
  <pre>&lt;script>alert('I LOVE ALERTS!')&lt;/script></pre>
  <h1>This is an &lt;H1&gt; Headline</h1>
  <hr>
  <h2>This is an &lt;H2&gt; Headline</h2>
  <h3>This is an &lt;H3&gt; Headline</h3>
  <h4>This is an &lt;H4&gt; Headline</h4>
  <h5>This is an &lt;H5&gt; Headline</h5>
  <h6>This is an &lt;H6&gt; Headline</h6>
  <p><img class=float-left style=width:100px src=//staticresource.com/user.png>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  <p><img class=float-right style=width:100px src=//staticresource.com/user.png>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  <p><img class=float-none src=//staticresource.com/user.png></p>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  <footer><a href=https://gist.github.com/tomhodgins/e330ec1826d1cde2b8b0>basic.css</a> is available on Github</footer>
</main>
              
            
!

CSS

              
                body {
  padding: 0;
  margin: 0;
  max-width: none;
}
body > main {
  padding: 1.5em;
  margin: 0 auto;
  max-width: 750px;
}
/* RFI Theme */
[data-theme=rfi] {
  color: #333;
  background: #eee;
  font-family: 'Open Sans', 'Source Sans Pro', Roboto, 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', 'Myriad Pro', 'Segoe UI', Myriad, Helvetica, 'Lucida Grande', 'DejaVu Sans Condensed', 'Liberation Sans', 'Nimbus Sans L', Tahoma, Geneva, Arial, sans-serif;
}
[data-theme=rfi] ::-moz-selection {
  color: white;
  text-shadow: none !important;
  background-color: #f60 !important;
}
[data-theme=rfi] ::-webkit-selection {
  color: white;
  text-shadow: none !important;
  background-color: #f60 !important;
}
[data-theme=rfi] ::selection {
  color: white;
  text-shadow: none !important;
  background-color: #f60 !important;
}
[data-theme=rfi] body > main {
  background: white;
  border-top: 1px solid #ddd;
  box-shadow: rgba(0,0,0,.05) 0 3px 3px;
}
[data-theme=rfi] h1,
[data-theme=rfi] h2,
[data-theme=rfi] h3,
[data-theme=rfi] h4,
[data-theme=rfi] h5,
[data-theme=rfi] h6 {
  color: #111;
  letter-spacing: -.04em;
  font-family: 'Open Sans', 'Myriad Pro', Myriad, 'Segoe UI', 'Source Sans Pro', Roboto, 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, 'Lucida Grande', 'DejaVu Sans Condensed', 'Liberation Sans', 'Nimbus Sans L', Tahoma, Geneva, Arial, sans-serif;
}
[data-theme=rfi] h1 {
  color: black;
  font-size: 325%;
  letter-spacing: -.05em;
  text-shadow: none;
  position: relative;
  z-index: 50;
}
[data-theme=rfi] h1 + h2 {
  margin-top: -.75em;
  color: #999;
  font-weight: 400;
}
[data-theme=rfi] code {
  color: #333;
  background: #eee;
  font-weight: 400;
  border: 1px solid #ccc;
  border-radius: 2px;
  text-shadow: none;
  box-shadow: none;
  position: relative;
  z-index: 0;
}
[data-theme=rfi] pre {
  color: #333;
  background: #eee;
  border: 1px solid #ccc;
}
[data-theme=rfi] blockquote {
  color: #999;
  letter-spacing: -.02em;
}
[data-theme=rfi] blockquote p {
  color: #f60;
  font-weight: 700;
  font-family: 'Source Sans Pro', 'Open Sans', Roboto, 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', 'Myriad Pro', 'Segoe UI', Myriad, Helvetica, 'Lucida Grande', 'DejaVu Sans Condensed', 'Liberation Sans', 'Nimbus Sans L', Tahoma, Geneva, Arial, sans-serif;
}
[data-theme=rfi] blockquote footer {
  color: #777;
}
[data-theme=rfi] a {
  color: #f60;
  font-weight: 500;
  text-shadow: inherit;
}
[data-theme=rfi] a:focus,
[data-theme=rfi] a:hover {
  color: #fc0;
  text-decoration: underline;
}
[data-theme=rfi] hr {
  background: #fc0;
}
[data-theme=rfi] footer {
  color: #999;
}
[data-theme=rfi] form select,
[data-theme=rfi] form .split-input > input,
[data-theme=rfi] form .split-input > select,
[data-theme=rfi] form [type="text"],
[data-theme=rfi] form [type="tel"],
[data-theme=rfi] form [type^="cc-"],
[data-theme=rfi] form [type="email"] {
  border-color: #ccc;
  font-family: 'Source Sans Pro', 'Open Sans', Roboto, 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', 'Myriad Pro', 'Segoe UI', Myriad, Helvetica, 'Lucida Grande', 'DejaVu Sans Condensed', 'Liberation Sans', 'Nimbus Sans L', Tahoma, Geneva, Arial, sans-serif;
  box-shadow: rgba(0,0,0,.15) 0 1px 1px;
}
[data-theme=rfi] form select:focus,
[data-theme=rfi] form .split-input > input:focus,
[data-theme=rfi] form .split-input > select:focus,
[data-theme=rfi] form [type="text"]:focus,
[data-theme=rfi] form [type="tel"]:focus,
[data-theme=rfi] form [type^="cc-"]:focus,
[data-theme=rfi] form [type="email"]:focus {
  border-color: orange;
  box-shadow: #fc0 0 0 3px;
}
[data-modal] article [data-theme=rfi] {
  background: white;
}
@media (min-width: 750px) {
  [data-theme=rfi] main > p {
    font-size: 12pt;
  }
}
@media (min-width: 750px) {
  [data-theme=rfi] body > main {
    margin: 3em auto;
    border-radius: 3px;
    border: 1px solid #ddd;
  }
}
              
            
!

JS

              
                document.documentElement.setAttribute('data-theme','rfi')
              
            
!
999px

Console