Skip to content
Discussion options

You must be logged in to vote

If you want to use .bg- classes, you'll need to apply them directly to each <td> or <th>, rather than to the <tr>.
Alternatively, you can use .text-bg- classes, which apply both background and corresponding text colors.

Another approach—depending on your use case—would be to customize the table styling using CSS variables:

  1. Assign an id (such as myTable) or class to your table.
  2. Redefine the striped row background color using CSS, like this:
#myTable {
  --bs-table-striped-bg: var(--bs-warning-bg-subtle);
  /* Do the same thing for the "normal" bg color, and for the text colors */
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@J4KU8Dev
Comment options

Answer selected by J4KU8Dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants