8000 MWPW-173425: Allow container to expand based on line height by zagi25 · Pull Request #4180 · adobecom/milo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MWPW-173425: Allow container to expand based on line height #4180

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

Merged
merged 1 commit into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions libs/blocks/card-horizontal/card-horizontal.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
border-radius: 4px;
gap: var(--spacing-s);
border: 1px solid #EAEAEA;
max-height: 130px;
max-width: 600px;
margin: 0 auto;
}
Expand All @@ -90,7 +89,6 @@

.card-horizontal .foreground .card-block .card-content {
padding-right: var(--spacing-s);
margin: 16px 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so convinced with this one. I see the image height is static, so that shouldn't impact the layout, right? However, we might see font changes in the near future, which would make the card text collapse with the borders. Is there any way we can avoid this? Maybe setting some paddings on inner elements?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@overmyheadandbody When I remove max-height margin will increase the height of the container (few pixels more than 130px, not much but because of the image it is visible) if there is enough text to fill out 5 lines.
The only way I can think of that will cause the text collapse with the borders is if the font-size drastically changes and line-clamp changes. Something like this
Screenshot 2025-05-21 at 03 16 12
Paddings don't do much, I can maybe keep the margin but decrease it so it doesn't affect container height ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's leave it as is for now and figure out edge cases later.

/* stylelint-disable-next-line value-no-vendor-prefix */
display: -webkit-box;
-webkit-line-clamp: 5;
Expand Down
Loading
0