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

Document that table styles will be inherited by nested tables #20497

Closed
simPod opened this issue Aug 10, 2016 · 5 comments
Closed

Document that table styles will be inherited by nested tables #20497

simPod opened this issue Aug 10, 2016 · 5 comments

Comments

@simPod
Copy link
Contributor

simPod commented Aug 10, 2016

Using v4.0.0 alpha3

The problem appears, when inside any <th> in <thead class="thead-inverse"> is another table inserted.

Therefore thead-inverse th rule is also applied on the inner table. Wouldn't it be better to have more specific thead-inverse > tr > th rule? Or am I missing something?

http://codepen.io/simPod/pen/wWRgzN

@twbs-lmvtfy
Copy link

Hi @simPod!

You appear to have posted a live example (http://codepen.io/simPod/pen/wWRgzN.html), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

  • line 21, column 26 thru line 22, column 24: th start tag in table body.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@simPod
Copy link
Contributor Author

simPod commented Aug 10, 2016

this bot is nice. Fixed example

@cvrebert
Copy link
Collaborator

So, we need to document this better, but this is working as intended. Per http://v4-alpha.getbootstrap.com/migration/#tables (emphasis added):

Nearly all instances of the > selector have been removed, meaning nested tables will now automatically inherit styles from their parents. This greatly simplifies our selectors and potential customizations.

@cvrebert cvrebert changed the title thead-inverse applies also on inner table when it is inserted within th element Document that table styles will be inherited by nested tables Aug 10, 2016
@simPod
Copy link
Contributor Author

simPod commented Aug 10, 2016

Very well then. So the proper usage is to put thead-default on the inner table, right?

@styks1987
Copy link

How are we supposed to reset an inner table styles? The opt-in approach is great and I'd love to opt-in to sub tables instead of them being the same as the parent. This kills any datepicker inside a table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants