-
Notifications
You must be signed in to change notification settings - Fork 673
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
[css-tables-3] Recommending to implement fixed header table by css #858
Comments
Thanks for the proposal but the current level of the specification tries to document how existing features work in browser, not to add new features. |
I recall that at some point this approach (fixed height + |
@FremyCompany Are proposals like this collected somewhere or only kept here? Sebastian |
I didn't close the issue here, just tentatively deferred to next level. I think this is the appropriate way to track proposals with our current GitHub workflow. |
I strongly support this proposal. Fixed, or sticky thead and tfoot are commonly used nowadays. However, it's not easy to achieve these effects by now. Since thead and tbody elements already exists, I think it's not hard for user agents to scroll tbody without affecting thead. I'm tired of using two tables to achieve this effect. |
Your assumption is not accurate here because -- at least in Edge but I think also in Chrome -- these elements do not generate boxes. It's literally as if the cells were direct children of the table grid. |
I would be curious to see how/if this could be solved for display:subgrid. If we can figure it out in that case, it might be possible to reimplement tables based on grid, and then support more scenarios. |
@FremyCompany but how does the background for these elements work, if it's not a box? BTW, it seems that Chrome has recently fixed its very old bug with table rows and table row groups background rendering (probably in issue 122988)? |
@SelenIT In our current implementation, the table draws multiple backgrounds in varying positions, to act as if the other elements had a background on their own. Just checked the fixed Chrome bug. They fixed how the sub backgrounds are being painted, looks like we have the same issue they had, or similar. I don't have the impression they added a box for the thead, they just fixed the code that draws the backgrounds. |
I suspect that it would be the case, but I haven't taken a look yet |
By the way, as the sticky positioning for any part of the table becomes widely supported, wouldn't this mostly automatically solve this issue (with addition of just one scrollable wrapper)? |
I agree. Edge does not support this scenario yet, though. |
As CSS Table is reworking, may I say the fixed header table is mostly wanted. The common way to implement a functional fixed header table now is by synchronizing 2 html tables with scripting, it's ugly and complicated. the best way is by giving a height measure to the tbody element if it can works:
#table tbody { height: 20em; }
Above example illustrate a table with a fixed body view of approximate 20 rows regardless how many rows of data it really loaded.
The text was updated successfully, but these errors were encountered: