-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Inconsistant .table-active color #24529
Comments
Hi @gillerr Thanks for reporting this. @mdo There is a comment on the table variant mixin mentioning the reason why we use But it's not only causing the problems described on this issue but also avoids having an active cell inside a colored row, like this: For now I'll add this comment, it'd be awesome if anyone wants to tackle this one. if not I'll probably have time to jump into it this week |
One more note about |
@mdo I am sure I am missing something, I tried to track down the history of why we use the Why can't we use something like this: .table-active { background-color: $table-active-bg; }
.table-dark {
&.table-active,
.table-active {
background-color: $table-dark-active-bg;
}
} @gijsbotje Can you help me out? |
The same problem exist with any contextual class if it has an opacity. For example if one defines some color variables with opacity. This gets even more interesting in combination with a striped table as you can see in this Plunkr http://next.plnkr.co/edit/y6FAFciwWTdbdsmK Expected result would be that all elements with the table-danger class would have the same background color. But depending on the combination of tr-class, td-class and striped table there are numerous variations because of the layered transparent colors. |
This will be resolved by #30342. |
@MartijnCuppens Will your tables PR cover this one as well? |
Yup, in #30466 |
According to your documentation at http://getbootstrap.com/docs/4.0/content/tables/,
table-active
class can be applied to eithertr
's,td
's orth
's. But the resulting background color will be different, with a darker color fortr
's.This could be seen in the following plunker:
http://plnkr.co/edit/aYMqCL0dKLPq9vPdDpWH?p=preview
The reason is that
table-active
is defined with an opacity and is applied to both thetr
and itstd
's /th
's.To fix that, instead of this selector:
I would simply use:
Another solution would be to use
#ECECEC
instead ofrgba(0,0,0,.075)
.The text was updated successfully, but these errors were encountered: