Material-UI tables get unintentionally stretched in Firefox 87+ and Chrome 91+ #25555
Labels
component: table
This is the name of the generic UI component, not the React module!
status: waiting for author
Issue with insufficient information
Hi! Sorry for not filling out your issue-template; I'm just forwarding an issue that was reported to Mozilla which in fact seems to be something that you'll want to fix in your library (or perhaps already have). (I don't have Material UI locally and can't set up a dev environment to test its latest version etc.)
STEPS TO REPRODUCE:
EXPECTED BEHAVIOR:
The table and its cells are only intended to be as tall as their contents (as they are in earlier versions of Firefox and Chrome)
ACTUAL BEHAVIOR
The table stretches to fill the available height in the browser's viewport.
Firefox and Chrome both fixed a bug here, which is what's responsible for the new behavior. Previously, they failed to stretch
<table>
elements as flex items (which are supposed to be stretched by default [in the cross axis] via the defaultalign-items:stretch
behavior that flex cotainers have). That was a weird and unintentional quirk due to the way tables are represented internally.It seems like Material-UI was inadvertently depending on this behavior.
You can get back the old behavior by styling these tables as
align-self:flex-start
-- you probably want to add that to any tables that live inside of flex containers, if the old behavior is what you're intending to get here.The text was updated successfully, but these errors were encountered: