-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
Support simpler table structure #34269
base: main
Are you sure you want to change the base?
Conversation
Starting to feel like it might be easier to just target the td,
th {
padding: $table-cell-padding-y $table-cell-padding-x;
background-color: var(--#{$variable-prefix}table-bg);
border-bottom-width: $table-border-width;
box-shadow: inset 0 0 0 9999px var(--#{$variable-prefix}table-accent-bg);
} .table-reset {
td,
th {
padding: unset;
background-color: unset;
border-bottom-width: unset;
box-shadow: unset;
}
} Also makes me think we can update some of these values to be more CSS variables, and then reset them that way. So instead of the above reset, something like this: .table-reset {
--bs-table-bg: unset;
--bs-table-border: unset;
// etc
} |
Indeed. However I'm still concerned this is a valid issue or not. |
From the discussion in the linked issue, we definetely need to adress this. Using a reset based on a class would ne some kind of regression since styles could leak again to nested tables. We coule do the same but target |
At this point, I'm almost wondering if we go the route of our old selectors and explicitly include |
Fixes #34184 Not quite sure about this, but requiring a `tbody` doesn't feel right either…
ef53363
to
87239ef
Compare
It'd be much simpler indeed, I guess. Regarding nested tables and leaking styles, the important parts are direct child combinators. |
Fixes #34184
Not quite sure about this, but requiring a
tbody
doesn't feel right either…