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.

            
              p Показать:

input(type='checkbox' id='rows')
label(for='rows') Горизонтальные грид-полосы<br>(ряды)

input(type='checkbox' id='columns')
label(for='columns') Вертикальные грид-полосы<br>(колонки)

input(type='checkbox' id='cells' checked)
label(for='cells') Грид-ячейки

input(type='checkbox' id='areas' checked)
label(for='areas') Грид-области

input(type='checkbox' id='lines')
label(for='lines') Грид-линии

input(type='checkbox' id='gutters')
label(for='gutters') Грид-интервалы

.container
  - var n = 0;
  while n < 20
    .cell грид-ячейка 
    - n++
  .area.area21
    span грид-область 2&times;1
  .area.area32
    span грид-область 3&times;2
  - var n = 0;
  while n < 4
    .row
      span горизонтальная грид-полоса (ряд)
    - n++
  - var n = 0;
  while n < 5
    .column
      span вертикальная грид-полоса<br> (колонка)
    - n++
  - var n = 0;
  while n < 5
    .line.line-row
      span=(n + 1)
      span=-(5 - n)
    - n++
  - var n = 0;
  while n < 6
    .line.line-column
      span=(n + 1)
      span=-(6 - n)
    - n++
  - var n = 0;
  while n < 3
    .gap.gap-row
    - n++
  - var n = 0;
  while n < 4
    .gap.gap-column
    - n++
  .holder-tl
  
            
          
!
            
              body {
  font: 14px/1 sans-serif;
  color: rgba(0,0,0,.8);
  --color-gray: rgba(192,192,192,.4);
}

.container {
  display: grid;
  grid: 40px 70px 50px 60px / 100px  110px 85px 90px 120px;
  grid-auto-rows: 15px;
  grid-auto-columns: 20px;
  grid-gap: 12px 10px;
  text-align: center;
}

.cell {
  background: var(--color-gray);
  border: 1px solid rgba(192,192,192,.4);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  z-index: 1;
  color: rgba(0,0,0,.7)
}
@for $i from 0 through 4 {
  @for $j from 0 through 5 {
    .cell:nth-child(#{($i * 5 + $j + 1)}) {
      grid-row: #{$i + 1};
      grid-column: #{$j + 1};
    }
  }
}
.area21 {
  background: rgba(255,192,0,.4);
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  display: flex;
  justify-content: center;
  align-items: start;
  color: #860;
}
.area32 {
  background: rgba(160,255,128,.4);
  grid-column: 2 / 5;
  grid-row: 2 / 4;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #080;
}
.row {
  background: linear-gradient(90deg, rgba(128,128,255,0), rgba(128,128,255,.3) 20px, rgba(128,128,255,.3) calc(100% - 20px), rgba(128,128,255,0));
  grid-column: -7 / 7;
  grid-row: 1 / 2;
  display: flex;
  justify-content: center;
  color: #44a;
}
.row:nth-child(23) {  grid-row: 2 / 3; }
.row:nth-child(24) {  grid-row: 3 / 4; }
.row:nth-child(25) {  grid-row: 4 / 5; }
.column {
  background: linear-gradient(rgba(255,128,128,0), rgba(255,128,128,.4) 20px, rgba(255,128,128,.4) calc(100% - 20px), rgba(255,128,128,0));
  grid-column: 1 / 2;
  grid-row: -6 / 6;
  color: #a44;
  writing-mode: vertical-rl;
  display: grid;
  justify-content: center;
}
.column:nth-child(27) {  grid-column: 2 / 3; }
.column:nth-child(28) {  grid-column: 3 / 4; }
.column:nth-child(29) {  grid-column: 4 / 5; }
.column:nth-child(30) {  grid-column: 5 / 6; }

.line-row {
  grid-column: 7 / -7;
  align-self: start;
  display: flex;
  justify-content: space-between;
  margin-top: -12px;
  padding: 0 5px;
  background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.5) 10px, rgba(0,0,0,.5) calc(100% - 10px), rgba(0,0,0,0));
  color: #fff;
  font: 12px/6px sans-serif;
}
.line-row:nth-child(32) { grid-row: 1 / 2; }
.line-row:nth-child(33) { grid-row: 2 / 3; }
.line-row:nth-child(34) { grid-row: 3 / 4; }
.line-row:nth-child(35) { grid-row: 4 / 5; }
.line-row:nth-child(36) { grid-row: 5 / 6; }

.line-column {
  grid-row: 6 / -6;
  justify-self: start;
  display: flex;
  flex-flow: column;
  width: 10px;
  justify-content: space-between;
  margin-left: -10px;
  padding: 3px 0;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.5) 7px, rgba(0,0,0,.5) calc(100% - 7px), rgba(0,0,0,0));
  color: #fff;
  font: 12px/6px sans-serif;
}
.line-column:nth-child(37) { grid-column: 1; }
.line-column:nth-child(38) { grid-column: 2; }
.line-column:nth-child(39) { grid-column: 3; }
.line-column:nth-child(40) { grid-column: 4; }
.line-column:nth-child(41) { grid-column: 5; }
.line-column:nth-child(42) { grid-column: 6; }

.gap-row {
  grid-column: 7 / -7;
  align-self: start;
  margin-top: -12px;
  height: 12px;
  background: linear-gradient(90deg, rgba(255,255,0,0), rgba(255,255,0,.5) 10px, rgba(255,255,0,.5) calc(100% - 10px), rgba(255,255,0,0));
}
.gap-row:nth-child(43) { grid-row: 2 / 3; }
.gap-row:nth-child(44) { grid-row: 3 / 4; }
.gap-row:nth-child(45) { grid-row: 4 / 5; }

.gap-column {
  grid-row: 6 / -6;
  justify-self: start;
  width: 10px;
  justify-content: space-between;
  margin-left: -10px;
  background: linear-gradient(rgba(255,255,0,0), rgba(255,255,0,.5) 7px, rgba(255,255,0,.5) calc(100% - 7px), rgba(255,255,0,0));
}
.gap-column:nth-child(46) { grid-column: 2; }
.gap-column:nth-child(47) { grid-column: 3; }
.gap-column:nth-child(48) { grid-column: 4; }
.gap-column:nth-child(49) { grid-column: 5; }

.holder-tl {
  grid-row: -6;
  grid-column: -7;
}

span {
  position: relative;
  z-index: 2;
  padding: 3px 0;
}
input {
  display: inline-block;
}
label {
  display: inline-block;
  width: 40%;
  vertical-align: top;
}
input:nth-of-type(odd) {
  margin-left: 10%;
}

#rows:not(:checked) ~ .container .row, #columns:not(:checked) ~ .container .column,
#cells:not(:checked) ~ .container .cell,
#areas:not(:checked) ~ .container .area,
#lines:not(:checked) ~ .container .line-row,
#lines:not(:checked) ~ .container .line-column,
#gutters:not(:checked) ~ .container .gap-row,
#gutters:not(:checked) ~ .container .gap-column
{
  display: none;
}

#rows:not(:checked) ~
#columns:not(:checked) ~
#cells:not(:checked) ~
#areas:not(:checked) ~
#lines:not(:checked) ~
#gutters:not(:checked) ~ .container .row:nth-child(25),
#rows:not(:checked) ~
#columns:not(:checked) ~
#cells:not(:checked) ~
#areas:not(:checked) ~
#lines:not(:checked) ~
#gutters:not(:checked) ~ .container .column:nth-child(30),
#rows:not(:checked) ~
#columns:not(:checked) ~
#cells:not(:checked) ~
#areas:not(:checked) ~
#lines:not(:checked) ~
#gutters:not(:checked) ~ .container .area:nth-child(22),
#rows:not(:checked) ~
#columns:not(:checked) ~
#cells:not(:checked) ~
#areas:not(:checked) ~
#lines:not(:checked) ~
#gutters:not(:checked) ~ .container .cell:nth-child(1) {
  display: block;
}


#rows:hover ~ .container .row, [for="rows"]:hover ~ .container .row,
#columns:hover ~ .container .column, [for="columns"]:hover ~ .container .column,
#cells:hover ~ .container .cell, [for="cells"]:hover ~ .container .cell,
#areas:hover ~ .container .area, [for="areas"]:hover ~ .container .area,
#lines:hover ~ .container .line, [for="lines"]:hover ~ .container .line,
#gutters:hover ~ .container .gap, [for="gutters"]:hover ~ .container .gap {
  z-index: 100;
}

            
          
!
999px
Loading ..................

Console