Skip to content

Commit

Permalink
feat: updated carousel for small viewport (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran McDade authored and Fran McDade committed Sep 26, 2024
1 parent bcbe4e4 commit 072d36e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const CARD_OFFSET_Y = 8;
export const CARD_SCALE_X = 40;
export const MAX_CARD_HEIGHT = 216;
export const MAX_CARD_HEIGHT_SM = 216;
export const MAX_CARD_HEIGHT_SM = 280;
export const MAX_DECK_SIZE = 1; // Currently, deck size is only 1 additional card.
export const MAX_CARD_WIDTH = 504;
export const CAROUSEL_HEIGHT = MAX_CARD_HEIGHT + MAX_DECK_SIZE * CARD_OFFSET_Y;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { mediaTabletUp } from "@databiosphere/findable-ui/lib/styles/common/mixins/breakpoints";
import {
mediaTabletDown,
mediaTabletUp,
} from "@databiosphere/findable-ui/lib/styles/common/mixins/breakpoints";
import {
inkLight,
smokeMain,
Expand Down Expand Up @@ -74,6 +77,13 @@ export const CardContent = styled.div`
margin-bottom: 0;
}
}
${mediaTabletDown} {
-webkit-box-orient: vertical;
display: -webkit-box;
-webkit-line-clamp: 10;
overflow: hidden;
}
`;

export const CardCallToAction = styled(MButtonBase)`
Expand All @@ -85,6 +95,12 @@ export const CardCallToAction = styled(MButtonBase)`
text-decoration-skip-ink: none;
text-underline-position: from-font;
p {
color: inherit;
font: inherit;
margin: 0;
}
&:hover {
text-decoration: none;
}
Expand Down

0 comments on commit 072d36e

Please sign in to comment.