-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check for blogpostcard if in carousel or grid #1149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for finding the issue.
Regarding to the solution, a component should not be dependent on the parent component and behave differently in a specific component (as BlogCard would behave differently in Carousel)
Better approach would be if Carousel gives some classes to its children. Specifically, <li>
element should give its child "h-full" class.
In tailwind, you can address children like this [&>*]:h-full
.
Please try to solve the issue as suggested and test properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All clear, well done 👍
One curious question added in comment
@@ -16,7 +17,7 @@ const EventCardShowcase = () => { | |||
dateTo="2023-05-12T15:00:00Z" | |||
imageSrc="https://cdn-api.bratislava.sk/strapi-homepage/upload/silvester_odpocitavanie_f45d8e6629.jpg" | |||
imageSizes={generateImageSizes({ default: '272px', lg: '384px' })} | |||
className="w-[272px] lg:w-96" | |||
className="h-[14.5rem] w-[272px] lg:h-[18.75rem] lg:w-96" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why combine rem and px?
(also on line 30)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just didn't care, because it's only in styleguide.
Test build pipeline info 🚀 🔜 next |
BlogPostCard
is used inside a carousel, then use full height and if in a grid then grid handles itself the height of the cards.