Implement a Blossom Carousel containing a row of slides arranged using CSS Grid. The gallery contains 3 images and each has different dimensions. However, they must all have the same height and each should have their width be resulting from height and intrinsic aspect ratio.
Carousel height is pre-given (477px) and should be defined using a CSS Custom Property called --carousel-height
All images render using their intrinsic aspect ratio, there is no clipping, no cropping
Height is defined by the CSS Custom property therefore image width is automatic
All images are rendered using the same height (--carousel height)
Figure caption element’ width is equal to the width of the image it’s describing
Image gallery lives inside a Blossom Carousel and is always exactly one row; items never wrap
On smaller screens, images don’t get compressed horizontally but maintain their width as dictated by --carousel height and image’s intrinsic aspect ratio.
Use CSS Grid
Using CSS Subgrid is allowed
Consult Blossom Carousel documentation page https://blossom-carousel.com/docs/examples#css-grid
Implement images using placeholders, e.g.
Ignore older carousel implementations found elsewhere in the codebase
Import carousel from “src/components/carousel.tsx”
Prefer using Tailwind CSS over creating separate CSS files
Considerations:
data-lenis-preventto the container holding the carousel. This will prevent nested containers and using trackpads to scroll carousels horizontally will work just as expected — that is, the carousel detects horizontal scrolling and prevents vertical movement unless the gesture is clearly vertical. That’s how it works on the Collins website.