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: active <tr>
fix
#37084
Table: active <tr>
fix
#37084
Conversation
Love the approach, but renaming CSS variables is a breaking change I think. We could keep this for v6, or we could try to address that and ship in v5.3. Thoughts? |
IMO, it should be in v5 since folks can't have an I put this PR in draft since it requires more work to make it smoother for users EDIT: I'll try to make no breaking change with the actual variables. |
bf1e75f
to
0d18e14
Compare
I think this version is way better since we don't rename the actual variables, we just introduce more of them. Furthermore, you can still give a special color by overriding the associated CSS var, it'll still continue to work correctly. I can't see any regression atm, shall I set this PR as open for 5.3.0? |
0d18e14
to
5a77b10
Compare
Fixed the syntax to match our variables everywhere else, but with the main merge we have a bundlewatch issue. Can you take a pass to update @louismaximepiton? |
@louismaximepiton can you rebase please? |
@@ -731,7 +731,7 @@ $table-cell-padding-x-sm: .25rem !default; | |||
$table-cell-vertical-align: top !default; | |||
|
|||
$table-color: var(--#{$prefix}body-color) !default; | |||
$table-bg: transparent !default; | |||
$table-bg: var(--#{$prefix}body-bg) !default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change.
Table background has been transparent since 2012
Also table-primary & table-secondary are available but not table-tertiary, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks a lot for your feedback!
I think I changed the default background from transparent
to var(--bs-body-bg)
because the nesting tables was broken if I remember well. I'm not sure how to handle this. If you have any other idea please don't hesitate to add a PR.
For .table-tertiary
, it doesn't exists yet since our components (buttons, list-group, ...) don't have such a variant. I think if it's done for one, it might be done on all sides at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming the part regarding the table variants. It's mentioned in our Tables > Variants documentation:
Heads up! Because of the more complicated CSS used to generate our table variants, they most likely won’t see color mode adaptive styling until v6.
Fixes #33913.
May close #35158.
Based on ffoodd's idea.
Live preview
Solutions
Commits can be split.
.active
on hoverables rows, I tried to implement Bug - tr background color for table-active when used with table-striped #33913 (comment). The main issue was the nesting thing, but seems to be fixed by setting the used variables toinitial
..table-dark
on the first table, on main is:On preview is:
Checks