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.

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

              
                <!-- :disabled -->
<section class="example-cntr disabled">
    <h1>CSS <code>:disabled</code> pseudo-class</h1>
    <p>The <code>:disabled</code> pseudo-class targets a form element in the disabled state. An element in a disabled state can’t be selected, checked, activated or gain focus.</p>
    <p>As you can see none of these form elements can be used. Notice the <code>disabled</code> attribute in the HTML.</p>
    <form class="flex-ctnr">
        <div>
            <h3>Text Field</h3>
            <input type="text" disabled>
        </div>
        <div>
            <h3>Radio Button</h3>
            <input type="radio" disabled>
        </div>
        <div>
            <h3>Check Box</h3>
            <input type="checkbox" disabled>
        </div>
        <div>
            <h3>Text Area</h3>
            <textarea cols="30" rows="10" disabled></textarea>
        </div>
    </form>
</section>
              
            
!

CSS

              
                //:disabled
.disabled {
    text-align: left;
    :disabled {
         opacity: .2;
    }
}



//Styling stuff not needed for demo
body { text-align: left; }
.example-cntr {
    max-width: 800px;
    margin: auto;
    padding: 20px 50px;    
    box-shadow: 0 1px 2px rgba(black,.3);
    background: rgba(black,.15);    
}
h1 {
    text-transform: none;
    border-bottom: #636363 1px dotted;
    code {
        display: inline-block;
        margin-bottom: 10px;
        color: $y;
        background: none;
        box-shadow: none;
    }
}
code { font-size: 1em; }
form {
    width: 100%;
    margin: 40px auto 20px;
    padding: 20px 10px;
    border-radius: 2px;
    font-size: 1.2em;
    text-align: center;
    background: rgba(black,.2);
}
input, label { cursor: pointer; }
input {
    width: 34px; height: 34px;
    vertical-align: middle;
    outline: none;
}
input[type=text],
input[type=email] { width: 100%; }
textarea {
    width: 100%;
    height: 50px;
}
label {
    padding: 3px 8px 5px;
    border-radius: 2px;
    border: transparent 1px solid;    
    transition: .5s;
    &:hover {
        border: rgba(white,.2) 1px solid;        
    }
}
h3 { font: italic 1em Georgia; }
.flex-ctnr {
    display: flex;
    justify-content: space-between;
    div { margin: 0 .5%; }
}

              
            
!

JS

              
                
              
            
!
999px

Console