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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              <div class='Theme Theme_color_light Set'>
  <h3>Цвет</h3>
  <div class='Set-Row'>
    <button class='Button'>Привет</button>
    <button class='Button Button_disabled'>Привет</button>
    <button class='Button Button_color_action'>Привет</button>
    <button class='Button Button_color_error'>Привет</button>
    <button class='Button Button_color_success'>Привет</button>
  </div>
  <div class='Set-Row'>
    <button class='Button Button_view_underline'>Привет</button>
    <button class='Button Button_disabled Button_view_underline'>Привет</button>
    <button class='Button Button_color_action Button_view_underline'>Привет</button>
    <button class='Button Button_color_error Button_view_underline'>Привет</button>
    <button class='Button Button_color_success Button_view_underline'>Привет</button>
  </div>  
  <h3>Размер</h3>
  <div class='Set-Row'>
    <button class='Button Button_size_m'>Привет</button>
    <button class='Button Button_size_l'>Привет</button>
    <button class='Button Button_size_xl'>Привет</button>
  </div>
  <div class='Set-Row'>
    <button class='Button Button_size_m Button_view_underline'>Привет</button>
    <button class='Button Button_size_l Button_view_underline'>Привет</button>
    <button class='Button Button_size_xl Button_view_underline'>Привет</button>
  </div>
</div>

<div class='Theme Theme_color_dark Set'>
  <h3>Цвет</h3>
  <div class='Set-Row'>
    <button class='Button'>Привет</button>
    <button class='Button Button_disabled'>Привет</button>
    <button class='Button Button_color_action'>Привет</button>
    <button class='Button Button_color_error'>Привет</button>
    <button class='Button Button_color_success'>Привет</button>
  </div>
  <div class='Set-Row'>
    <button class='Button Button_view_underline'>Привет</button>
    <button class='Button Button_disabled Button_view_underline'>Привет</button>
    <button class='Button Button_color_action Button_view_underline'>Привет</button>
    <button class='Button Button_color_error Button_view_underline'>Привет</button>
    <button class='Button Button_color_success Button_view_underline'>Привет</button>
  </div>
  <h3>Размер</h3>
  <div class='Set-Row'>
    <button class='Button Button_size_m'>Привет</button>
    <button class='Button Button_size_l'>Привет</button>
    <button class='Button Button_size_xl'>Привет</button>
  </div>
  <div class='Set-Row'>
    <button class='Button Button_size_m Button_view_underline'>Привет</button>
    <button class='Button Button_size_l Button_view_underline'>Привет</button>
    <button class='Button Button_size_xl Button_view_underline'>Привет</button>
  </div>
</div>
            
          
!

CSS

            
              .Theme_color_light {
  --color-bg: #f7f7f7;
  --coloron-bg: #222; 
    
  --color-primary: #222;
  --coloron-primary: #fff;
  
  --color-secondary: #777;
  --coloron-secondary: #ddd;
  
  --color-surface: #fff;
  --coloron-surface: #222;
  
  --color-error: #d00;
  --coloron-error: #fff;
  
  --color-success: #090;
  --coloron-success: #fff;
}

.Theme_color_dark {
  --color-bg: #444;
  
  --color-primary: #fff;
  --coloron-primary: #fff;
  
  --color-secondary: #777;
  --coloron-secondary: #fff;
  
  --color-surface: #555;
  --coloron-surface: #fff;
  
  --color-action: #ffc107;
  --coloron-action: #555;
  
  --color-error: #700;
  --coloron-error: #fff;
}

.Set {
  display: inline-block;
  background: var(--color-surface);
  padding: 20px;
  color: var(--color-primary);
  box-shadow: 0 10px 10px #999;
  margin: 10px;
}

.Set-Row {
  margin: 10px 0;
}

.Button {
  --Button-bg: var(--color-bg);
  --Button-border: var(--color-secondary);
  --Button-color: var(--color-primary);
  --Button-shadow: var(--color-bg);
  --Button-fontSize: 1rem;
  
  background: var(--Button-bg);
  border: 1px solid var(--Button-bg);
  color: var(--Button-color);
  padding: 1em 2em;
  font-size: var(--Button-fontSize);
  transition: .3s;
  border-radius: 3px;
  font-weight: 500;
}

.Button:not(.Button_disabled):hover {
  background: var(--Button-color);
  color: var(--Button-bg);
  cursor: pointer;
  box-shadow: 0 10px 20px var(--Button-shadow);
}

.Button_disabled {
  background: #ddd;
  border-color: #ddd;
  color: #999;
  cursor: default;
  box-shadow: none;
}

.Button_view_underline {
  border-radius: 0;
  background: none;
  border-color: transparent;
  border-bottom: 2px solid var(--Button-bg);
  color: var(--Button-bg);
}

.Button_view_underline:not(.Button_disabled):hover {
  background: var(--Button-bg);
  color: var(--Button-color);
}

/* Модификаторы темы оформления */
.Button_color_action {
  --Button-bg: var(--color-action, #00a);
  --Button-color: var(--coloron-action, #fff);
}

.Button_color_error {
  --Button-bg: var(--color-error, #f00);
  --Button-color: var(--coloron-error, #fff);
}

.Button_color_success {
  --Button-bg: var(--color-success, #090);
  --Button-color: var(--coloron-success, #fff);
}

.Button_size_m {
  --Button-fontSize: 12px;
}

.Button_size_l {
  --Button-fontSize: 15px;
}

.Button_size_xl {
  --Button-fontSize: 20px;
}
            
          
!

JS

            
              
            
          
!
999px

Console