@import "src/styles/variables"; $fluid_cell: 250px; .wrap { max-width: 2000px; padding: 0 40px 40px 40px; display: flex; flex-direction: column; } $cols: $content_width / $cell; @mixin fluid { @media(min-width: 640px) { .fluid & { @content } } } .container { max-width: $content_width; width: 100%; &.fluid { max-width: none; } } .grid { width: 100%; box-sizing: border-box; display: grid; grid-template-columns: repeat(auto-fit, minmax($cell - 5, 1fr)); grid-template-rows: 50vh $cell; grid-auto-rows: $cell; grid-auto-flow: row dense; grid-column-gap: $gap; grid-row-gap: $gap; @include fluid { grid-template-columns: repeat(auto-fit, minmax($fluid_cell - 5, 1fr)); grid-template-rows: $fluid_cell; grid-auto-rows: $fluid_cell; } @media (max-width: ($cell + 5) * 2) { // rework stamp, so it will be shown as smaller one on mobiles grid-template-columns: repeat(auto-fit, minmax($cell / 1.5 - 5, 1fr)); grid-template-rows: 50vh $cell; } } .pad_last { grid-column-end: $cols + 1; } .hero { grid-row-start: 1; grid-row-end: 2; grid-column-start: 1; grid-column-end: -1; background: darken($content_bg, 2%); border-radius: $radius; display: flex; align-items: center; justify-content: center; font: $font_24_semibold; @include fluid { grid-row-end: span 2; grid-column-end: span 4; @media(max-width: ($cell + 5) * 3) { grid-column-end: -1; } } } .stamp { grid-row-end: span 3; grid-column: -2 / -1; display: flex; align-items: stretch; justify-content: stretch; overflow: hidden; position: relative; }