use direct-child selector more in table styles to better support nested tables

Fixes #10231.
/to @mdo for review.