Skip to content
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

[Card] Using a <vaadin-icon> in the media slot in combination with the stretch-media or cover-media theme variant results in a broken layout in Firefox #8641

Open
jouni opened this issue Feb 5, 2025 · 1 comment

Comments

@jouni
Copy link
Member

jouni commented Feb 5, 2025

Description

The icon is incorrectly sized and overflows the card boundaries. This only happens in Firefox.

Image

Expected outcome

Image

Minimal reproducible example

<vaadin-card theme="stretch-media">
  <vaadin-icon slot="media" icon="lumo:photo"></vaadin-icon>
  <div>Lapland is the...</div>
</vaadin-card>

Steps to reproduce

  • Clone project.
  • yarn && npm start.
  • Open dev/card.html.
  • Choose "Icon" from the Media select.
  • Check the "Stretch Media" variant checkbox.

Environment

Vaadin version(s): 24.7 alpha
OS: macOS
Browser: Firefox 135

Browsers

Firefox

@jouni
Copy link
Member Author

jouni commented Feb 5, 2025

The combination of container: size and display: inline-flex on breaks the aspect-ratio in Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant