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. 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

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

              
                <h1>Agrémentez votre vol</h1>
<div class="options">
  <input type="checkbox" id="repas-chaud">
  <label for="repas-chaud">
    Repas chaud
  </label>
  <input type="checkbox" id="ecouteurs">
  <label for="ecouteurs">
    Écouteurs
  </label>
  <input type="checkbox" id="tablette">
  <label for="tablette">
    Tablette
  </label>
  <input type="checkbox" id="aperitif">
  <label for="aperitif">
    Apéritif
  </label>
  <input type="checkbox" id="kit-confort">
  <label for="kit-confort">
    Kit Confort
  </label>
  <input type="checkbox" id="chiot">
  <label for="chiot">
    Chiot de compagnie
  </label>
  <input type="checkbox" id="bouteille-vin">
  <label for="bouteille-vin">
    Bouteille de vin
  </label>
  <input type="checkbox" id="kit-tricot">
  <label for="kit-tricot">
    Kit de tricot
  </label>
  <input type="checkbox" id="bouteille-eau">
  <label for="bouteille-eau">
    Bouteille d'eau
  </label>
</div>
              
            
!

CSS

              
                :root {
  --accent-r: 35;
  --accent-g: 106;
  --accent-b: 211;

  --base-r: 96;
  --base-g: 96;
  --base-b: 96;

  --semi: 0.5;

  --accent: rgb(var(--accent-r), var(--accent-g), var(--accent-b));
  --accent-semi: rgba(
    var(--accent-r),
    var(--accent-g),
    var(--accent-b),
    var(--semi)
  );

  --base: rgb(var(--base-r), var(--base-g), var(--base-b));
  --base-semi: rgba(var(--base-r), var(--base-g), var(--base-b), var(--semi));

  --transition: all 0.25s linear;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.options > label {
  --couleur-bordure: var(--base);
  --couleur-ombre: transparent;

  display: block;
  border-radius: 0.5rem;
  padding: 0.5rem;
  min-height: 5rem;
  cursor: pointer;

  background-color: #ffffff;
  border: 2px solid var(--couleur-bordure);
  box-shadow: 0rem 0rem 0rem 0.15rem var(--couleur-ombre);
  transition: var(--transition);
}

.options > label:hover {
  --couleur-bordure: var(--base);
  --couleur-ombre: var(--base-semi);
}

.options > label::before {
  content: " ";

  display: block;
  width: 1rem;
  height: 1rem;
  margin-bottom: 0.05rem;

  border-radius: 50%;
  border: 2px solid var(--base);
  transition: var(--transition);
}

.options > input[type="checkbox"] {
  width: 0;
  height: 0;
  position: absolute;
}

.options > input[type="checkbox"]:checked + label {
  --couleur-bordure: var(--accent);
  --couleur-ombre: var(--accent-semi);
}

.options > input[type="checkbox"]:checked + label::before {
  background-color: var(--accent);
  box-shadow: inset 0rem 0rem 0rem 0.15rem rgba(255, 255, 255, 0.8);
}

body {
  font-family: system-ui, sans-serif;
  max-width: 480px;
  margin: 0 auto;
  background-color: #f1f1f1;
  padding: 1rem;
}
label {
  font-weight: bold;
}

              
            
!

JS

              
                
              
            
!
999px

Console