Home > Article > Web Front-end > compass tables tables common styles of tables [Sass and compass study notes]_html/css_WEB-ITnose
Demo source code address https://github.com/qqqzhch/webfans
compass’s table provides centralized common styles
Table bordersouter-table-borders ($width, $color) Control the size and color of the outer borders
inner-table-borders($width, $color) Control the size and color of the inner borders
For example
.table1{ table { @include inner-table-borders(1px, #7a98c6); @include outer-table-borders(2px); }}
Outer row and column (top left) font
table-scaffolding
For example
.table2{ table { @include table-scaffolding; }}
Table row and column color
alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color, $footer-color)
The parameters are even numbers respectively Row color, odd row color, cross row color, header color, bottom color
for example
.table3{ table { $table-color: #7a98c6; @include alternating-rows-and-columns($table-color, adjust-hue($table-color, -120deg), #222222); }}