distillpub / post--communicating-with-interactive-articles

https://distill.pub/2020/communicating-with-interactive-articles
Creative Commons Attribution 4.0 International
38 stars 15 forks source link

sticky table header #5

Open fredhohman opened 4 years ago

fredhohman commented 4 years ago

@mathisonian can you see if you can get the thead or th to be sticky and always shown when scrolling on the example table?

Relevant code is here: ac785ccc323aedd2c27b2d94cefac7387624b3ff

I worry this is something with the Distill css table template styling.

Best I could get is the following:

Screen Shot 2020-05-03 at 4 05 22 PM
mathisonian commented 4 years ago

I'm not sure there's a great way to do it with just CSS. Maybe we use something like https://github.com/bsssshhhhhhh/svelte-data-grid