feat(tags): dynamically adjust tag list columns based on tag count (#233)

This commit is contained in:
Óscar Fernández
2023-12-30 17:42:26 +01:00
committed by GitHub
parent d257e022ea
commit 9fc45f288d
2 changed files with 32 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
.tag-cloud {
#tag-cloud {
margin-top: 4vmin;
ul {
@@ -8,6 +8,34 @@
}
.tags-item {
margin-top: 1rem;
margin-bottom: 1rem;
}
}
@mixin column-count($count) {
-webkit-column-count: $count;
-moz-column-count: $count;
column-count: $count;
}
.two-columns ul {
@include column-count(2);
}
.three-columns ul {
@include column-count(3);
}
@media (max-width: 1000px) {
.three-columns ul {
@include column-count(2);
}
}
@media (max-width: 600px) {
.two-columns ul,
.three-columns ul {
@include column-count(1);
}
}