picturepan2 / spectre

Spectre.css - A Lightweight, Responsive and Modern CSS Framework
https://picturepan2.github.io/spectre/
MIT License
11.31k stars 804 forks source link

Support for fixed first column in horizontal-scrollable tables #686

Open jimbobmcgee opened 2 years ago

jimbobmcgee commented 2 years ago

I have added a gist (https://gist.github.com/jimbobmcgee/edd734e4bfc3eb7c90ae7ef001f8b756) for the extra CSS needed to allow a table with table-scroll to have a first column which remains on screen during the scroll. The colours are just taken from the Spectre docs page, but work for striped and hovered tables, too.

I'm not a SASS guy, so I am not about to meddle with any preprocessor, but if you want to incorporate it within your SASS rules so it better respects screen sizes, colours, etc., please feel free.

It also might be better to target a specific class, e.g. table-sticky, which is easily achievable.