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

Table striped row color setting for included elements - Bootstrap version 5.1.1 vs. 5.1.3 #35158

Closed
3 tasks done
ZeEmEs opened this issue Oct 10, 2021 · 4 comments · Fixed by #37084
Closed
3 tasks done
Labels
Projects

Comments

@ZeEmEs
Copy link

ZeEmEs commented Oct 10, 2021

Prerequisites

Describe the issue

Up to version 5.1.1 it was this in the stylesheet

.table-striped > tbody > tr:nth-of-type(odd) { --bs-table-accent-bg: var(--bs-table-striped-bg); color: var(--bs-table-striped-color); }

from 5.1.2 on it is

.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: var(--bs-table-striped-bg); color: var(--bs-table-striped-color); }

Now all child elements get a color. Often enough this color setting overrides the one given to the element.
Is there a special reason for the change?
Now it's more difficult setting ones own colors for the elements in a table row. And Bootstrap is more opinionated in regard to the color setting in table row.

Btw. same applies to the setting for the .table-hover > tbody > tr:hover vs. .table-hover > tbody > tr:hover > *

Reduced test cases

see description

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

No response

What version of Bootstrap are you using?

5.1.1 vs. 5.1.3

@maciek-szn
Copy link
Contributor

#34799 seems to be a breaking change.

tjustino added a commit to tjustino/smoothie_funds that referenced this issue Oct 19, 2021
@fjalexandre
Copy link

I join the ZeEmEs request.

I use bootstrap within an asp.net project.

This change has prevented me from upgrading from version 5.1.1 to 5.1.2 (5.1.3 at the time of writing this post is not available as a nuget package).

In version 5.1.1 when I use a table of type table-striped I can customize the color of the font used in the headers using the statement:

Now, with this change, it would force me to have to personalize the color of the font used in the table headers, going column by column.

Going through all the code to make this change is really a pain.

@XhmikosR XhmikosR added this to To do in v5.2.0 via automation Nov 1, 2021
@mdo mdo added this to To do in v5.2.0-stable via automation May 13, 2022
@mdo mdo removed this from To do in v5.2.0 May 13, 2022
@mdo mdo removed this from To do in v5.2.0-stable Jul 11, 2022
@mdo mdo added this to To do in v5.3.0 via automation Jul 11, 2022
@G2G2G2G
Copy link

G2G2G2G commented Aug 7, 2022

@dippas thanks for linking a stackoverflow that links to this thread...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v5.3.0
To do
Status: To do
Development

Successfully merging a pull request may close this issue.

6 participants