Ability to add striped table?

Created on 13 July 2023, over 1 year ago
Updated 21 July 2023, over 1 year ago

I have this enabled on my 10.1.1 site and it works great as far as being able to specify that my tables are Borderless, Scrollable, Stackable, or Sortable, but I see that Striped is not an option anywhere. Is that done some other way or is this just not an option to specify as of now?

✨ Feature request
Status

Fixed

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States socalerich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @socalerich
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    I went off of https://designsystem.digital.gov/components/table/ which I don't see a stripped.

  • πŸ‡ΊπŸ‡ΈUnited States socalerich

    There are actually a few examples on that page "Scrollable table with horizontal stripes", "Compact scrollable table with horizontal stripes", and "Sortable striped table with various content types". Although it's not required that the table be scrollable, sortable or anything else for that matter. At the end of the day you just add the class "usa-table--striped" to the main table tag and you get stripes. There are even USWDS settings to specify the colors to use for the stripes for both normal stripes and stripes for the column when sorted.

    Right now I will need to have my client decide if ALL tables will either be striped or not and handle the stripes completely in custom CSS. The content editor would not have a way to specify if the table should be striped without clicking the Source button in CkEditor and manually adding the "usa-table--striped" class to the table. Not a big deal, but hate having to tell them to edit source ever.

    Anyway, thought it would be cool to add that. I have no idea how hard that would be.

  • @smustgrave opened merge request.
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Try this.

  • πŸ‡ΊπŸ‡ΈUnited States socalerich

    This is awesome. THANKS!

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024