-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vertical_on_small_screen
Table component option
Borrowing liberally from [Adam Fenwick's Responsive Accessible Table example](https://www.afenwick.com/blog/2021/responsive-accessible-table/). On tablet-sized screens and smaller, it switches the layout of the table into a vertical list of cards, which we believe is more usable for all. I've strayed from the example in the choice of screen size, because the specific case that I was using to test this (API Users index page) seems usable as a regular table on screens a fair bit smaller than "desktop". If that's not true for other tables in the app, we can easily change the hard-coded media queries or even supply the breakpoint as an argument to the component. I've essentially appended the new styling to the end of the existing component CSS because those existing styles apply more generally to all govuk-tables (i.e. they didn't specify the app-c-table class or prefix). I think it'll make more sense to merge the styles together when we're ready to merge our changes into the gem.
- Loading branch information
Showing
3 changed files
with
111 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters