Рассматривая различные подходы к кладке и, в частности, просматривая сводку здесь
https://css-tricks.com/piecing-together-approaches-for-a-css-masonry-layout/
Сказано: «Вертикальный порядок с неровными днища в порядке? "
С кодовым пером, теоретически показывающим это рваные основания, здесь https://codepen.io/chriscoyier/pen/NeRNBO или здесь https://codepen.io/chriscoyier/pen/XojXxy
Но я не могу посмотрите, где рваные основания
Либо мне нужна подсказка, либо эта проблема уже решена браузерами?
(подход в коде, чистый css)
.masonry-with-columns {
columns: 6 200px;
column-gap: 1rem;
div {
width: 150px;
background: #EC985A;
color: white;
margin: 0 1rem 1rem 0;
display: inline-block;
width: 100%;
text-align: center;
font-family: system-ui;
font-weight: 900;
font-size: 2rem;
}
@for $i from 1 through 36 {
div:nth-child(#{$i}) {
$h: (random(400) + 100) + px;
height: $h;
line-height: $h;
}
}
}
(или гибкая)
.masonry-with-flex {
display: flex;
flex-direction: column;
flex-wrap: wrap;
max-height: 1000px;
div {
width: 150px;
background: #EC985A;
color: white;
margin: 0 1rem 1rem 0;
text-align: center;
font-family: system-ui;
font-weight: 900;
font-size: 2rem;
}
@for $i from 1 through 36 {
div:nth-child(#{$i}) {
$h: (random(400) + 100) + px;
height: $h;
line-height: $h;
}
}
}