cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <!-- Question: est-ce qu'une entité est réutilisable ? Si oui, bloc -->

<!-- bloc search -->
<form class="search">
  
  <!-- bloc + element logo -->
  <img class="logo search__logo" src="https://placeimg.com/272/92/tech/sepia" width="272" height="92">
  
  <!-- bloc + element input -->
  <input type="text" class="input search__input">
  
  <!-- element buttons-wrapper -->
  <div class="search__buttons-wrapper">
    
    <!-- bloc + element button / modifier active -->
    <button type="button" class="button button__active search__button">Recherche BEM</button>
    
    <!-- bloc + element button -->
    <button type="button" class="button search__button">J'ai de la chance</button>
  </div>
</form>
            
          
!
            
              @use postcss-nested;
@use postcss-cssnext;

:root {
  --gutter: 20px;
  
  --search-width: 540px;
  --search-height: 100vh;
  
  --input-height: 45px;
  
  --button-color: #757575;
  --button-background: #f2f2f2;
  --button-color-active: #222222;
  --button-background-active: #f8f8f8;
  --button-border-active: #c6c6c6;
}

.search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  
  width: var(--search-width);
  height: var(--search-height);
  
  margin: auto;
  padding: var(--gutter);
  
  font-family: system-ui;
  
  &__logo {
    margin: 0 auto var(--gutter);
  }
  
  &__input {
    border: 0;
    border-radius: 2px;
    
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.08);
  }
  
  &__buttons-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    
    margin-top: calc(var(--gutter) * 2);
  }
  
  &__button {
    margin: 0 calc(var(--gutter) / 4);
  }
}

.logo {
  display: block;
}

.input {
  font-size: 18px;
  
  min-height: var(--input-height);
  padding: 0 var(--gutter);
}

.button { 
  height: 35px;
  
  font-size: 13px;
  font-weight: bold;
  
  color: var(--button-color);
  background-color: var(--button-background);
 
  border: 1px solid transparent;
  border-radius: 2px;
  
  transition: all .15s ease-in-out;
  
  &__active, &:hover, &:active {
    color: var(--button-color-active);
    background-color: var(--button-background-active);
    
    border: 1px solid var(--button-border-active);
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  }
}

*:focus {
    outline: none;
}
            
          
!
999px
Loading ..................

Console