filamentgroup / tablesaw

A group of plugins for responsive tables.
MIT License
5.48k stars 434 forks source link

Nested tables: Css and javascript should only affect/parse .tablesaw-stack direct children #286

Closed dotnetwise closed 1 year ago

dotnetwise commented 7 years ago

Currently if you have another table under i.e. footer which you don't want to apply the tablesaw at all, both the css rules and the javascript applies to them as well. Please always restrict it to just level 1 (direct children of thead/th, tbody/td e.g.

.tablesaw-stack > tbody > tr {
               display: block;
        width: 100%;
        height: 2px;
        background-color: red;
        border-bottom: 1px solid #777;
    }

    .tablesaw-stack > thead > td, .tablesaw-stack > thead > th {
        display: none
    }

    .tablesaw-stack > tbody > td, .tablesaw-stack > tbody > th {
        display: block;
        float: left;
        clear: left;
        width: 100%
    }

Same to the javascript: image