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

              
                -
  var rules = {
    'inset (positioning)': [
      { style: 'position: relative; inset-block-start:  11px;', ltrTB: 'position: relative; top:    11px;' },
      { style: 'position: relative; inset-block-end:    11px;', ltrTB: 'position: relative; bottom: 11px;' },
      { style: 'position: relative; inset-inline-start: 11px;', ltrTB: 'position: relative; left:   11px;' },
      { style: 'position: relative; inset-inline-start: 11px;', ltrTB: 'position: relative; right:  11px;' },
      { style: 'position: relative; inset-block:  11px 12px;'   , ltrTB: 'position: relative; top:  11px; bottom: 12px;' },
      { style: 'position: relative; inset-inline: 11px 12px;'   , ltrTB: 'position: relative; left: 11px; right : 12px;' },
      { style: 'position: relative; inset: 11px 12px 13px 14px;', ltrTB: 'position: relative; top:  11px; left  : 12px; bottom: 13px; right: 14px;' },
    ],
    sizing: [
      { style: 'block-size     : 100px;', ltrTB: 'height    : 100px;' },
      { style: 'inline-size    : 100px;', ltrTB: 'width     : 100px;' },
      { style: 'min-block-size : 100px;', ltrTB: 'min-height: 100px;' },
      { style: 'min-inline-size: 100px;', ltrTB: 'min-width : 100px;' },
      { style: 'max-block-size : 100px;', ltrTB: 'max-height: 100px;' },
      { style: 'max-inline-size: 100px;', ltrTB: 'max-width : 100px;' },
    ],
    margins: [
      { style: 'margin-block-start:  1px;', ltrTB: 'margin-top   : 1px;' },
      { style: 'margin-block-end   : 1px;', ltrTB: 'margin-bottom: 1px;' },
      { style: 'margin-inline-start: 1px;', ltrTB: 'margin-left  : 1px;' },
      { style: 'margin-inline-end :  1px;', ltrTB: 'margin-right : 1px;' },
      { style: 'margin-block : 1px 2px;' , ltrTB: 'margin-top : 1px; margin-bottom: 2px;' },
      { style: 'margin-inline: 1px 2px;' , ltrTB: 'margin-left: 1px; margin-right : 2px;' },
      { style: 'margin: logical 1px 2px 3px 4px;', ltrTB: 'margin-top : 1px; margin-left  : 2px; margin-bottom: 3px; margin-right: 4px;' },
    ],
    padding: [
      { style: 'padding-block-start : 1px;', ltrTB: 'padding-top   : 1px;' },
      { style: 'padding-block-end   : 1px;', ltrTB: 'padding-bottom: 1px;' },
      { style: 'padding-inline-start: 1px;', ltrTB: 'padding-left  : 1px;' },
      { style: 'padding-inline-end  : 1px;', ltrTB: 'padding-right : 1px;' },
      { style: 'padding-block : 1px 2px;' , ltrTB: 'padding-top : 1px; padding-bottom: 2px;' },
      { style: 'padding-inline: 1px 2px;' , ltrTB: 'padding-left: 1px; padding-right : 2px;' },
      { style: 'padding: logical 1px 2px 3px 4px;', ltrTB: 'padding-top : 1px; padding-left  : 2px; padding-bottom: 3px; padding-right: 4px;' },
    ],
    'text-align': [
      { style: 'text-align: start;', ltrTB: 'text-align: left ;' },
      { style: 'text-align: end  ;', ltrTB: 'text-align: right;' },
    ],
    'border-*-width': [
      { style: 'border-block-start-width : 11px;', ltrTB: 'border-top-width   : 11px;' },
      { style: 'border-block-end-width   : 11px;', ltrTB: 'border-bottom-width: 11px;' },
      { style: 'border-inline-start-width: 11px;', ltrTB: 'border-left-width  : 11px;' },
      { style: 'border-inline-end-width  : 11px;', ltrTB: 'border-right-width : 11px;' },
      { style: 'border-block-width : 11px 12px;', ltrTB: 'border-top-width : 11px; border-bottom-width: 12px;' },
      { style: 'border-inline-width: 11px 12px;', ltrTB: 'border-left-width: 11px; border-right-width : 12px;' },
      { style: 'border-width: logical 11px 12px 13px 14px;', ltrTB: 'border-top-width: 11px; border-left-width: 12px; border-bottom-width: 13px; border-right-width: 14px;'},
    ],
    'border-*-style': [
      { style: 'border-block-start-style : dashed;', ltrTB: 'border-top-style   : dashed;' },
      { style: 'border-block-end-style   : dashed;', ltrTB: 'border-bottom-style: dashed;' },
      { style: 'border-inline-start-style: dashed;', ltrTB: 'border-left-style  : dashed;' },
      { style: 'border-inline-end-style  : dashed;', ltrTB: 'border-right-style : dashed;' },
      { style: 'border-block-style : dashed double;', ltrTB: 'border-top-style : dashed; border-bottom-style: double;' },
      { style: 'border-inline-style: dashed double;', ltrTB: 'border-left-style: dashed; border-right-style : double;' },
      { style: 'border-style: logical dashed double groove ridge;', ltrTB: 'border-top-style: dashed; border-left-style: double; border-bottom-style: groove; border-right-style: ridge;'},
    ],
    'border-*-color': [
      { style: 'border-block-start-color : red;', ltrTB: 'border-top-color   : red;' },
      { style: 'border-block-end-color   : red;', ltrTB: 'border-bottom-color: red;' },
      { style: 'border-inline-start-color: red;', ltrTB: 'border-left-color  : red;' },
      { style: 'border-inline-end-color  : red;', ltrTB: 'border-right-color : red;' },
      { style: 'border-block-color : red blue;', ltrTB: 'border-top-color : red; border-bottom-color: blue;' },
      { style: 'border-inline-color: red blue;', ltrTB: 'border-left-color: red; border-right-color : blue;' },
      { style: 'border-color: logical red blue green yellow;', ltrTB: 'border-top-color: red; border-left-color: blue; border-bottom-color: green; border-right-color: yellow;'},
    ],
    'border-*': [
      { style: 'border-block-start : 11px dashed red;', ltrTB: 'border-top   : 11px dashed red;' },
      { style: 'border-block-end   : 11px dashed red;', ltrTB: 'border-bottom: 11px dashed red;' },
      { style: 'border-inline-start: 11px dashed red;', ltrTB: 'border-left  : 11px dashed red;' },
      { style: 'border-inline-end  : 11px dashed red;', ltrTB: 'border-right : 11px dashed red;' },
      { style: 'border-block : 11px dashed red;'                   , ltrTB: 'border-top : 11px dashed red; border-bottom: 11px dashed red;'},
      { style: 'border-block : 11px dashed red / 12px double blue;', ltrTB: 'border-top : 11px dashed red; border-bottom: 12px double blue;'},
      { style: 'border-inline: 11px dashed red;'                   , ltrTB: 'border-left: 11px dashed red; border-right : 11px dashed red;'},
      { style: 'border-inline: 11px dashed red / 12px double blue;', ltrTB: 'border-left: 11px dashed red; border-right : 12px double blue;'},
      { style: 'border: 11px dashed red / 12px double blue / 13px groove green / 14px ridge yellow;', ltrTB: 'border-top: 11px dashed red; border-bottom: 12px double blue; border-left: 13px groove green; border-right: 14px ridge yellow;'},
    ],
  }

h1 Testing CSS Logical Properties
each group,index in rules
  section
    h2= index
    each obj in group
      div(style=obj.style)
        code= obj.style
        small(title="left-to-right, top-to-bottom (à la English)")= obj.ltrTB

              
            
!

CSS

              
                div {
  background-color: #eee;
  padding: 1rem;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}
code {
  font-weight: bold;
}
small {
  margin-left: 4ch;
  quotes: '(' ')';
  opacity: 0.618034;
  cursor: help;
  &::before { content: open-quote; }
  &::after  { content: close-quote; }
}
              
            
!

JS

              
                
              
            
!
999px

Console