0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/assets/sass/modules/tables.scss

87 lines
1.7 KiB
SCSS
Raw Normal View History

/*
* Table classes
*
* Table of Contents
*
* Base Styles
* Styles Tables
* Raw Tables
*/
2014-03-11 18:23:42 -05:00
/* ==========================================================================
Base Styles
========================================================================== */
%table {
2014-03-11 18:23:42 -05:00
@include baseline;
width: 100%;
2014-03-11 18:23:42 -05:00
max-width: 100%;
background-color: transparent;
th,
td {
padding: 8px;
line-height: 20px;
text-align: left;
vertical-align: middle;
}
}
/* ==========================================================================
Styles Tables
========================================================================== */
.table {
@extend %table;
th,
td {
2014-03-11 18:23:42 -05:00
border-top: 1px solid $lightbrown;
}
th {
color: $brown;
}
2014-03-11 18:23:42 -05:00
caption + thead tr:first-child th,
caption + thead tr:first-child td,
colgroup + thead tr:first-child th,
colgroup + thead tr:first-child td,
thead:first-child tr:first-child th,
thead:first-child tr:first-child td {
border-top: 0;
}
tbody + tbody {
border-top: 2px solid $lightbrown;
}
2014-03-11 18:23:42 -05:00
table table {
background-color: #fff;
}
2014-03-11 18:23:42 -05:00
tbody > tr:nth-child(odd) > td,
tbody > tr:nth-child(odd) > th {
background-color: lighten($lightbrown, 5%);
}
&.plain {
tbody > tr:nth-child(odd) > td,
tbody > tr:nth-child(odd) > th {
background: transparent;
}
}
}
/* ==========================================================================
Raw Tables
========================================================================== */
table {
@extend %table;
2014-03-11 18:23:42 -05:00
}