Pen Settings



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


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


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.


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.


  <aside class="controls">
        Document Direction <small>(block axis)</small>
      <select data-for="direction">
        <option value="ltr">left to right (ltr)</option>
        <option value="rtl">right to left (rtl)</option>
        Writing Mode <small>(inline axis)</small>
      <select data-for="writing-mode">
        <option value="horizontal-tb">horizontal top to bottom (horizontal-tb)</option>
        <option value="vertical-rl">vertical right to left (vertical-rl)</option>
        <option value="vertical-lr">vertical left to right (vertical-lr)</option>
    <button>Logical Props Y'all</button>
    <p>Lorem ipsum 🤓 dolor sit amet consectetur adipisicing elit.</p>


                button {
  /*  browsers with no support  */
  padding: 1ch 2ch;
  border: none;
  border: 5px solid hsl(160 50% 80%);
  border-top: none;
  border-bottom: none;
  /*  for everyone  */
  padding-block: 1ch;
  padding-inline: 2ch;
  border-inline: 1px solid hsl(160 50% 80%);
  border-block: none;
  appearance: none;
  cursor: pointer;
  font-size: 1.25rem;
  background: hsl(160 50% 90%);
  color: hsl(160 50% 20%);
  border-radius: 1ch;

main {
  display: grid;
  place-items: center;
  grid-auto-flow: row;
  gap: 4rem;

p {
  max-inline-size: 30ch;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.75;
  margin-block: 1ch;
  text-align: start;

@media (orientation: landscape) {
  main {
    grid-auto-flow: column;

html {
  block-size: 100%;
  inline-size: 100%;

body {
  min-block-size: 100%;
  min-inline-size: 100%;
  margin: 0;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  font-family: system-ui, sans-serif;

aside {
  display: grid;
  gap: 2ch;
  padding: 2ch;
  background: white;
  border: 1px solid lightgray;

aside h3 {
  margin: 0 0 .5em 0;


                import $ from ''

const [article] = $('article')

$('select').on('change', e => {
  const prop = $('data-for')[prop] =