Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

  header header
  main main
  aside aside
  section.e1 section 1
  section.e2 section 2
  section.e3 section 3
  nav nav
  footer footer
  |        OxxO
  |       X oo X
  |       X >< X
  |        XXXX~<>
  |      (..)(..)
              $sizeXS = 30rem
$sizeS = 70rem

  display grid // à déclarer d'emblé car l'ordre des éléments n'est pas forcément celui du html
  grid-template-rows repeat(2, auto) 1fr // permet à 'main' (3ème rangée) d'occuper tout l'espace disponible
  grid-gap 1rem

  grid-area nav

  grid-area header

  grid-area main

  grid-area aside

  grid-area e1

  grid-area e2

  grid-area e3

  grid-area footer
  //grid-row row3-start / row3-end // footer colé en bas
@media (max-width $sizeXS)

    grid-template-columns repeat(1, 1fr)
    grid-template-areas 'nav' 'header' 'main' 'aside' 'e1' 'e2' 'e3' 'footer'

@media (min-width $sizeXS) and (max-width $sizeS)

    grid-template-columns repeat(2, 1fr)
    grid-template-areas 'nav nav' 'header header' 'main main' 'aside aside' 'e1 e2' 'e3 e3' 'footer footer'

@media (min-width $sizeS)

    grid-template-columns repeat(3, 1fr)
    grid-template-areas 'nav nav nav' 'aside header header' 'aside main main' 'e1 e2 e3' 'footer footer footer'

// For demo:

  height 100%

  //min-height 100vh
  margin 0
  font-family Arial
  color #fff
  background-color #333

body *
  padding 1rem

  background-color #8bc34a

  background-color Orange

  background-color #448aff

  background-color #e91e63

  background-color #f44336

  background-color #607d8b

  background-color #455a64

  background-color #37474f
              // @link https://caniuse.com/#feat=css-grid

// @link https://developer.mozilla.org/fr/docs/Web/CSS/grid-template-areas
// @link https://la-cascade.io/css-grid-layout-guide-complet/
// @link http://putaindecode.io/fr/articles/css/grilles/grid-layout/

// @note Choix des couleurs :
// @link https://www.materialpalette.com/
// @link https://www.materialui.co/
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.