-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
name: Bug report
about: If you’ve already asked for help with a problem and confirmed something is broken with Tailwind CSS itself, create a bug report.
title: aspect-[value] breaks layout when combined with min-w-0 inside flex containers
labels: bug
assignees:
⸻
What version of Tailwind CSS are you using?
v3.4.1
What build tool (or framework if it abstracts the build tool) are you using?
Vite 5.1.0
What version of Node.js are you using?
v20.11.0
What browser are you using?
Chrome 123
What operating system are you using?
macOS Sonoma 14.3
Reproduction URL
https://play.tailwindcss.com/Q3aAsYhxse
Describe your issue
When using aspect-[16/9] or any arbitrary aspect ratio inside a flex container with min-w-0, the element fails to respect the aspect ratio and collapses to height 0 in Chrome. Removing min-w-0 or replacing aspect-[16/9] with a standard aspect-video fixes it, but that limits flexibility.
This bug causes layout breaks in responsive components where aspect ratios are needed dynamically.
Expected behavior: The element should maintain its aspect ratio regardless of min-w-0 when aspect-[16/9] is applied.