Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bootstrap, overriding tables with cascading styles is too verbose
/*
Due to boostrap's high specificity on td styles
I cannot see a shorter method to override this.
*/
.table.vert-align-mid > thead > tr > td,
.table.vert-align-mid > thead > tr > th,
.table.vert-align-mid > tbody > tr > td,
.table.vert-align-mid > tbody > tr > th,
.table.vert-align-mid > tfoot > tr > td,
.table.vert-align-mid > tfoot > tr > th,
.table > thead.vert-align-mid > tr > td,
.table > thead.vert-align-mid > tr > th,
.table > tbody.vert-align-mid > tr > td,
.table > tbody.vert-align-mid > tr > th,
.table > tfoot.vert-align-mid > tr > td,
.table > tfoot.vert-align-mid > tr > th,
.table > thead > tr.vert-align-mid > td,
.table > thead > tr.vert-align-mid > th,
.table > tbody > tr.vert-align-mid > td,
.table > tbody > tr.vert-align-mid > th,
.table > tfoot > tr.vert-align-mid > td,
.table > tfoot > tr.vert-align-mid > th,
.table > thead > tr > td.vert-align-mid,
.table > thead > tr > th.vert-align-mid,
.table > tbody > tr > td.vert-align-mid,
.table > tbody > tr > th.vert-align-mid,
.table > tfoot > tr > td.vert-align-mid,
.table > tfoot > tr > th.vert-align-mid {
vertical-align: middle;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment