foundation
Version:
You may also want to checkout:
85 lines (69 loc) • 1.8 kB
text/stylus
//
// Table Variables
//
$include-html-table-classes ?= $include-html-classes;
// These control the background color for the table and even rows
$table-bg ?= #fff;
$table-even-row-bg ?= #f9f9f9;
// These control the table cell border style
$table-border-style ?= solid;
$table-border-size ?= 1px;
$table-border-color ?= #ddd;
// These control the table head styles
$table-head-bg ?= #f5f5f5;
$table-head-font-size ?= emCalc(14px);
$table-head-font-color ?= #222;
$table-head-font-weight ?= bold;
$table-head-padding ?= emCalc(8px) emCalc(10px) emCalc(10px);
// These control the row padding and font styles
$table-row-padding ?= emCalc(9px) emCalc(10px);
$table-row-font-size ?= emCalc(14px);
$table-row-font-color ?= #222;
$table-line-height ?= emCalc(18px);
// These are for controlling the display and margin of tables
$table-display ?= table-cell;
$table-margin-bottom ?= emCalc(20px);
//
// Table Mixin
//
table() {
background: $table-bg;
margin-bottom: $table-margin-bottom;
border: $table-border-style $table-border-size $table-border-color;
thead,
tfoot {
background: $table-head-bg;
font-weight: $table-head-font-weight;
tr {
th,
td {
padding: $table-head-padding;
font-size: $table-head-font-size;
color: $table-head-font-color;
text-align: $default-float;
}
}
}
tr {
th,
td {
padding: $table-row-padding;
font-size: $table-row-font-size;
color: $table-row-font-color;
}
&.even,
&.alt,
&:nth-of-type(even) { background: $table-even-row-bg; }
}
thead tr th,
tfoot tr th,
tbody tr td,
tr td,
tfoot tr td { display: $table-display; line-height: $table-line-height; }
}
if $include-html-table-classes {
/* Tables */
table {
table();
}
}