been trying to fix this sidebar component and kept hitting walls because of how max-width interacts with the parent sizing. someone sent me a snippet that looked like it would work but it just collapsed everything to zero.
>the width should scale naturally with the containernever trust a quick copy-paste from stack overflow@container (max-width: 400px) {.card { width: 100%; }}tbh it's just easier to stick to min-width and avoid the headache