Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                mixin _about(desc)
    details.brl_100
        summary.brl_100 About
        .brl_100.content
            .brl_100
                p= desc
                
mixin _browser(tag, firefox)
    details.brl_100
        summary.brl_100 Browser Support
        .brl_100.content
            .brl_100
                p(style= 'margin-bottom: 8px') The numbers in the table specify the first browser version that fully supports the element.
                table
                    tr.browser
                        th Element
                        each _th in ['chrome', 'safari', 'opera', 'firefox', 'internet-explorer']
                            th
                                i.fab(class= 'fa-' + _th)
                    tr
                        td= tag
                        each _td in ['12.0', '6.0', '15.0', firefox]
                            td= _td
                        td(style= 'color: #ff0000') &Cross;
                        
mixin _attr(attr)
    details.brl_100
        summary.brl_100 Attributes
        .brl_100.content
            .brl_100
                table
                    tr.attribute
                        th Default
                        th Global
                        th Event
                    tr
                        td= attr
                        td(style= 'color: #008800') &check;
                        td(style= 'color: #008800') &check;
        
.brl.container
    .title
        h1 DETAILS
    .brl_100.article
        +_about('The <details> tag is new in HTML5.')
        details.brl_100
            summary.brl_100 Definition &amp; Usage
            .brl_100.content
                .brl_100
                    ol
                        li The &lt;details&gt; tag specifies additional details that the user can view or hide on demand.
                        li The &lt;details&gt; tag can be used to create an interactive widget that the user can open and close.
                        li Any sort of content can be put inside the &lt;details&gt; tag.
                        li The content of a &lt;details&gt; element should not be visible unless the open attribute is set.
        +_browser('<details>', '49.0')
        details.brl_100
            summary.brl_100 Tips &amp; Notes
            .brl_100.content
                .brl_100
                    ol
                        li The &lt;summary&gt; tag defines a visible heading for the &lt;details&gt; element.
                        li The heading can be clicked to view/hide the details.
        +_attr('open')
.brl.container
    .title
        h1 SUMMARY
    .brl_100.article
        +_about('The <summary> tag is new in HTML5.')
        details.brl_100
            summary.brl_100 Definition &amp; Usage
            .brl_100.content
                .brl_100
                    ol
                        li The &lt;summary&gt; tag defines a visible heading for the &lt;details&gt; element.
                        li The heading can be clicked to view/hide the details.
        +_browser('<summary>', '48.0')
        details.brl_100
            summary.brl_100 Tips &amp; Notes
            .brl_100.content
                .brl_100
                    ol
                        li The &lt;summary&gt; element should be the first child element of the &lt;details&gt; element.
        +_attr('none')
|
|
a.me(href='https://codepen.io/uzcho_/pens/popular/?grid_type=list' target='_blank')
              
            
!

CSS

              
                .brl, .brl_100{
    @include _layout($bl, $rl, $l)
}

.brl_100{
    width: 100%
}

body{
    font-family: 'Lato'
}

.container{
    @include _relative-box($n, $n, 0 16px, 50%, 100%);
    overflow-y: auto
}

.container:first-of-type{
    box-shadow: 2px 0 0 0 #e6e6e6
}

.title{
    @include _solid-box(#fff, 16px 0, 0, $n, $n, 0, 100%, $n);
    @include _layout($bl, $st, $n);
    text-align: $c;
    z-index: 10;
    box-shadow: 0 8px 6px -6px #999
}

.article{
    padding: 100px 0 0 0
}

details{
    padding: 16px 0
}

summary{
    background: #f1f1f1;
    padding: 8px;
    font-weight: 900;
    cursor: pointer;
    outline: $no;
    box-shadow: 0 8px 6px -6px #dbdbdb;
    &::before{
        @include _offset(50%, 8px, $n, $n);
        @include _layout($bl, $ab, $n);
        font-size: 20px;
        font-weight: 900;
        transform: translate(0, -50%);
        content: "+"
    }
    &:focus::before{
        content: "-"
    }
}

.content{
    padding: 0 16px;
    @include _pseudo-complete($bfaf, $bl, $n, $n, $n, $n, $n, 16px, $n){
        #{$bdb}: 8px solid transparent
    }
    &::before{
        left: 0;
        #{$bdr}: 16px solid #dbdbdb
    }
    &::after{
        right: 0;
        #{$bdl}: 16px solid #dbdbdb
    }
    div{
        padding: 8px;
        border: 1px solid #e6e6e6;
        #{$bdt}: $no
    }
}

p, ol, table{
    font-size: 14px
}

ol{
    @include _space(0, 0 16px);
    list-style-position: outside
}

table{
    width: 100%;
    border-collapse: collapse;
    text-align: $c
}

table, th, td{
    border: 1px solid #a3a3a3
}

tr:nth-child(even){
    background: #f1f1f1
}

.browser th:nth-child(1){
    width: 20%
}

.browser th:nth-child(n+2){
    width: 16%
}

.attribute th{
    width: calc(100% / 3)
}

th, td{
    height: 40px
}

@media (max-width: 767px){
    .container{
        @include _dimension(100%, auto)
    }

    .container:first-of-type{
        box-shadow: $no
    }

    .article{
        padding: 50px 0 100px 0
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console