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

Tables: add a fix to handle .bg-* and .text-* utilities on tables. #38826

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Jun 26, 2023

Description

Set the background and color on the table itself so it avoids nesting. Added for every cell a cascade if the --bs-table-color/bg is redefined. If not, every cell inherits the table color/bg.

Please double-check that :

  • utilities work at any level now.
  • nesting still resets style.
  • variants still work.
  • other variants such as .table-hover, .table-active, etc... still work

⚠️ Sass variables relating to table color are set to inherit to make things working using .text-bg-primary for example.

Motivation & Context

Many issues and discussions about the fact that the utilities used to work and weren't working anymore on table at every level.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • (NA) My change introduces changes to the documentation
  • (NA) I have updated the documentation accordingly
  • (NA) I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related discussions

#38727
#38730
#38690
#38744
#39812
https://github.com/orgs/twbs/discussions/40747

Related issues

Closes #38779

@gvreddy04

This comment was marked as off-topic.

@gvreddy04

This comment was marked as off-topic.

@ozkoidi
Copy link

ozkoidi commented Jun 12, 2024

Any plans on merging this pull requests? These were indeed breaking changes. Not only on background colors of tables but font colors too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v5.3.0: Table rows can no longer be colored with text-bg-*
4 participants