Merged in feat/SW-1384-filter-functionality (pull request #1262)

feat(SW-1384): Implement filtering for CarouselCards component

* feat(SW-1384): Implement filtering for CarouselCards component

* fix(SW-1384): Simplify CarouselCards filters scrolling styles

* refactor(SW-1384): Simplify CarouselCards filtering logic


Approved-by: Christian Andolf
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-02-06 14:32:55 +00:00
parent 3d1295e4d5
commit 7c8d6cbc2e
8 changed files with 98 additions and 23 deletions

View File

@@ -0,0 +1,31 @@
/*
Mock styles for the carousel cards. Will be removed/replaced
when the carousel functionality is implemented (SW-1542).
*/
.cardsContainer {
display: grid;
gap: var(--Spacing-x3);
grid-auto-flow: column;
grid-auto-columns: 100%;
overflow-x: auto;
overscroll-behavior-x: contain;
scroll-snap-type: x mandatory;
}
.cardsContainer > * {
scroll-snap-align: start;
}
/* Show 2 cards on tablet */
@media (min-width: 768px) {
.cardsContainer {
grid-auto-columns: calc((100% - var(--Spacing-x3)) / 2);
}
}
/* Show 3 cards on desktop */
@media (min-width: 1024px) {
.cardsContainer {
grid-auto-columns: calc((100% - var(--Spacing-x3) * 2) / 3);
}
}