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

              
                <section class="fluid-flex second-grid">
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
</section>
              
            
!

CSS

              
                /**************************
AVAILABLE CLASSES AND VARS:
- repeating-grid
   --grid-repeat -> Define repeat
   --grid-gap -> Define gap

- repeating-flex
   --flex-repeat -> Define repeat
   --flex-gap -> Define gap 

- fluid-grid
   --fluid-grid-min -> Define min-size
   --grid-gap -> Define gap 

--fluid-flex
   --fluid-flex-min -> Define min-size
   --flex-gap -> Define gap 

DEFAULTS: 
--layout-fluid-min: 40ch;
--layout-default-repeat: 3;
--layout-default-gap: 3vmax;


SUBGRID
To use subgrid, this is currently scoped to about 4 rows maximum, but can easily be enhanced with the variable: --subgrid-rows
the gap can be manipulated by --subgrid-gap
NOTE: WHEN USING SUBRID CONTAINMENT GETS DISABLED (by design this was failproofed in the base CSS)

CONTAINER QUERIES
Each child is a container with the default name: "grid-item".
This can be overwritten with:
--grid-item-container


***************************/

section {
  --flex-repeat: 3;
  --flex-gap: 2vw;

  div {
    height: 10vh;
    background: deeppink;
  }
}

body {
  padding: 2vw;
}

              
            
!

JS

              
                
              
            
!
999px

Console