Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column Striping Feature for Tables #33354

Merged
merged 1 commit into from
Feb 6, 2022
Merged

Column Striping Feature for Tables #33354

merged 1 commit into from
Feb 6, 2022

Conversation

Macinto5h
Copy link
Contributor

@Macinto5h Macinto5h commented Mar 14, 2021

Pull request contains the following items that contribute to the feature request in Issue #31457

  • Styling for class table-striped-vertical that enables column striping for tables.
  • A new Sass variable $table-striped-vertical-order such that the vertical striping order can be customized and deviate from the row striping order.
  • Documentation for column striping, along with additional examples added to table variants section.

Fixes #31457

@Macinto5h Macinto5h requested a review from a team as a code owner March 14, 2021 21:41
Copy link
Member

@ffoodd ffoodd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems great, thanks for tackling this!

I wonder if we shouldn't go with colgroup and cols for this, I think it could be simpler.

Andy thoughts?

scss/_tables.scss Outdated Show resolved Hide resolved
scss/_tables.scss Outdated Show resolved Hide resolved
@Macinto5h
Copy link
Contributor Author

@ffoodd sorry I didn't respond to the colgroup comment until now. Leveraging colgroup and col is useful for styling columns that share styling consecutively, but here we are dealing with alternating styling. That approach would end with adding extra markup that would be redundant. Instead, I've simplified the CSS selector :)

Copy link
Member

@ffoodd ffoodd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me, sorry for the delay!

Regarding col and colgroup you're right, only extra markup for almost the same CSS selector.

Concerning colspan no worry, we don't support rowspan either in .table-striped.

So this is IMHO a very nice addition, thanks a lot!

@Macinto5h Macinto5h closed this Dec 16, 2021
@Macinto5h Macinto5h reopened this Dec 16, 2021
Co-Authored-By: Macallan Camara <44030647+Macinto5h@users.noreply.github.com>
Co-Authored-By: XhmikosR <xhmikosr@gmail.com>
@mdo
Copy link
Member

mdo commented Feb 6, 2022

Renamed the class and squashed everything. Thanks!

@mdo mdo merged commit d2986da into twbs:main Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Striped table columns
3 participants