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?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

SoCalErich created an issue. See original summary.

smustgrave’s picture

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

erichhaemmerle’s picture

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 to be striped. 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’s picture

Status: Active » Needs review

Try this.

erichhaemmerle’s picture

This is awesome. THANKS!

smustgrave’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.