Skip to content

Instantly share code, notes, and snippets.

@rococodogs
Created May 10, 2016 18:02
Show Gist options
  • Select an option

  • Save rococodogs/9a16d11c7a3a8cad35b770063ffc427a to your computer and use it in GitHub Desktop.

Select an option

Save rococodogs/9a16d11c7a3a8cad35b770063ffc427a to your computer and use it in GitHub Desktop.
/* default tables to look like bootstrap's `.table.table-bordered`
if no class is passed through (this is to allow users to insert tables
with T4 and have them look like tables on the rest of the site). using
the `:not([class])` selector to target tables without a class attribute
and not affect global table styles for those using separate styles.
*/
table:not([class]) {
border: 1px solid #dddddd;
border-left: 0;
border-collapse: separate;
border-radius: 4px;
border-spacing: 0;
margin-bottom: 20px;
max-width: 100%;
min-width: 100%;
text-indent: 0;
}
table:not([class]) td,
table:not([class]) th {
border-left: 1px solid #dddddd;
border-top: 1px solid #dddddd;
line-height: 20px;
padding: 8px;
}
table:not([class]) tr {
display: table-row;
vertical-align: inherit;
}
table:not([class]) tbody:first-child tr:first-child td:first-child,
table:not([class]) tr:first-child td:first-child {
border-top-left-radius: 4px;
}
table:not([class]) tr:first-child td {
border-top: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment