summaryrefslogtreecommitdiffstats
path: root/src/components/PostsList/PostsList.module.scss
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-29 18:11:51 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-29 18:11:51 +0100
commit7038c517ee9fe4415f17b4b20e39a4c11a934b3c (patch)
tree66d7ea0b8b81075f8f76014f43f8fa7e8bfa9435 /src/components/PostsList/PostsList.module.scss
parent8e0c8c9255ba5ab466d8372fe223efeb5a3f0833 (diff)
chore: make year sticky in posts list
Diffstat (limited to 'src/components/PostsList/PostsList.module.scss')
-rw-r--r--src/components/PostsList/PostsList.module.scss23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/components/PostsList/PostsList.module.scss b/src/components/PostsList/PostsList.module.scss
index 0b9aa2d..471b172 100644
--- a/src/components/PostsList/PostsList.module.scss
+++ b/src/components/PostsList/PostsList.module.scss
@@ -1,11 +1,32 @@
+@use "@styles/abstracts/mixins" as mix;
@use "@styles/abstracts/placeholders";
.list {
@extend %reset-ordered-list;
- margin: var(--spacing-md) auto;
+ margin: 0 auto var(--spacing-md);
}
li.item {
margin: var(--spacing-md) 0;
+
+ &:first-of-type {
+ 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;
}