diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-06 19:27:45 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-06 19:30:06 +0100 |
| commit | 722ec20bad64d8c69b173c163011d37ad0b55591 (patch) | |
| tree | 0470e54f758d9383fff3fdb4c9b685faa3bde6ae /src/components/PostsList/PostsList.module.scss | |
| parent | 1494985a636fe22417615648062f17bc82c35655 (diff) | |
chore: move Main grid to its children
This way I can use full width background for some blocks.
Diffstat (limited to 'src/components/PostsList/PostsList.module.scss')
| -rw-r--r-- | src/components/PostsList/PostsList.module.scss | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/components/PostsList/PostsList.module.scss b/src/components/PostsList/PostsList.module.scss index 471b172..8a6c083 100644 --- a/src/components/PostsList/PostsList.module.scss +++ b/src/components/PostsList/PostsList.module.scss @@ -1,9 +1,33 @@ @use "@styles/abstracts/mixins" as mix; @use "@styles/abstracts/placeholders"; +.section { + display: grid; + grid-template-columns: + minmax(0, 1fr) min(calc(100vw - calc(var(--spacing-md) * 2)), 80ch) + minmax(0, 1fr); + align-items: first baseline; +} + +.year { + grid-column: 2; + margin-bottom: 0; + + @include mix.media("screen") { + @include mix.dimensions("md") { + grid-column: 1; + justify-self: end; + position: sticky; + top: 0; + margin-right: var(--spacing-lg); + } + } +} + .list { @extend %reset-ordered-list; + grid-column: 2; margin: 0 auto var(--spacing-md); } @@ -14,19 +38,3 @@ li.item { margin-top: var(--spacing-sm); } } - -.section { - @include mix.media("screen") { - @include mix.dimensions("sm") { - display: grid; - grid-template-columns: max-content minmax(0, 1fr); - align-items: first baseline; - gap: var(--spacing-md); - } - } -} - -.year { - position: sticky; - top: 0; -} |
