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

              
                <div class="bl_mario">
  <div class="bl_mario_itemRed1"></div>
  <div class="bl_mario_itemRed2"></div>
  <div class="bl_mario_itemRed3"></div>
  <div class="bl_mario_itemRed4"></div>
  <div class="bl_mario_itemRed5"></div>
  <div class="bl_mario_itemRed6"></div>
  <div class="bl_mario_itemRed7"></div>
  <div class="bl_mario_itemRed8"></div>
  <div class="bl_mario_itemRed9"></div>
  <div class="bl_mario_itemRed10"></div>
  <div class="bl_mario_itemRed11"></div>
  <div class="bl_mario_itemRed12"></div>
  <div class="bl_mario_itemRed13"></div>
  <div class="bl_mario_itemGre1"></div>
  <div class="bl_mario_itemGre2"></div>
  <div class="bl_mario_itemGre3"></div>
  <div class="bl_mario_itemGre4"></div>
  <div class="bl_mario_itemGre5"></div>
  <div class="bl_mario_itemGre6"></div>
  <div class="bl_mario_itemGre7"></div>
  <div class="bl_mario_itemGre8"></div>
  <div class="bl_mario_itemGre9"></div>
  <div class="bl_mario_itemGre10"></div>
  <div class="bl_mario_itemGre11"></div>
  <div class="bl_mario_itemGre12"></div>
  <div class="bl_mario_itemGre13"></div>
  <div class="bl_mario_itemGre14"></div>
  <div class="bl_mario_itemGre15"></div>
  <div class="bl_mario_itemGre16"></div>
  <div class="bl_mario_itemGre17"></div>
  <div class="bl_mario_itemGre18"></div>
  <div class="bl_mario_itemGre19"></div>
  <div class="bl_mario_itemGre20"></div>
  <div class="bl_mario_itemGre21"></div>
  <div class="bl_mario_itemYel1"></div>
  <div class="bl_mario_itemYel2"></div>
  <div class="bl_mario_itemYel3"></div>
  <div class="bl_mario_itemYel4"></div>
  <div class="bl_mario_itemYel5"></div>
  <div class="bl_mario_itemYel6"></div>
  <div class="bl_mario_itemYel7"></div>
  <div class="bl_mario_itemYel8"></div>
  <div class="bl_mario_itemYel9"></div>
  <div class="bl_mario_itemYel10"></div>
  <div class="bl_mario_itemYel11"></div>
  <div class="bl_mario_itemYel12"></div>
  <div class="bl_mario_itemYel13"></div>
  <div class="bl_mario_itemYel14"></div>
  <div class="bl_mario_itemYel15"></div>
</div>
              
            
!

CSS

              
                $pixel: 10px;
$red: #db2900;
$green: #8a7301;
$yellow: #ffa33c;


.bl_mario {
    display: grid;
    grid-template-columns: 1fr repeat(12, $pixel) 1fr;
    grid-template-rows: repeat(16, $pixel);
    grid-template-areas : 
        "... ... ... ... r01 r01 r01 r01 r01 ... ... ... ..." 
        "... ... ... r02 r02 r02 r02 r02 r02 r02 r02 r02 ..." 
        "... ... ... g01 g01 g01 y01 y01 g02 y02 ... ... ..." 
        "... ... g04 y05 g03 y03 y01 y01 g02 y02 y04 y04 ..." 
        "... ... g04 y05 g03 g05 y01 y01 y06 g06 y04 y04 y07" 
        "... ... g07 g07 y08 y08 y01 y01 g08 g08 g08 g08 ..." 
        "... ... ... ... y09 y09 y09 y09 y09 y09 y09 ... ..." 
        "... ... ... g09 g09 r03 g10 g10 g10 ... ... ... ..." 
        "... ... g13 g09 g09 r03 g11 g11 r04 g12 g12 g12 ..." 
        "... g14 g14 g14 g14 r05 r05 r05 r05 g12 g12 g12 g15" 
        "... y10 y10 g16 r06 y11 r07 r07 y12 r08 g17 y13 y13" 
        "... y10 y10 y14 r09 r09 r09 r09 r09 r09 y15 y13 y13" 
        "... y10 y10 r10 r09 r09 r09 r09 r09 r09 r11 y13 y13" 
        "... ... ... r12 r12 r12 ... ... r13 r13 r13 ... ..." 
        "... ... g18 g18 g18 ... ... ... ... g19 g19 g19 ..." 
        "... g20 g18 g18 g18 ... ... ... ... g19 g19 g19 g21";

    @for $i from 1 through 21 {
        &_itemRed#{$i} {
            @if $i < 10 {
                grid-area: r0#{$i};
            } @else {
                grid-area: r#{$i};
            }
            background-color: $red;
        }
        &_itemGre#{$i} {
            @if $i < 10 {
                grid-area: g0#{$i};
            } @else {
                grid-area: g#{$i};
            }
            background-color: $green
        }
        &_itemYel#{$i} {
            @if $i < 10 {
                grid-area: y0#{$i};
            } @else {
                grid-area: y#{$i};
            }
            background-color: $yellow;
        }
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console