Striped tables, finished implementation of the features described in issue #32

This commit is contained in:
Angelos Chalaris 2016-11-22 00:08:27 +02:00
parent e99dcae2a9
commit 42ee89f147
6 changed files with 16 additions and 2 deletions

View file

@ -936,6 +936,9 @@ table {
text-align: right; }
table.horizontal.preset tbody tr:first-child > td {
padding-left: 20px; } }
table.striped tr:nth-of-type(2n) > td {
background: #eeeeee; }
.card {
display: -webkit-box;
-webkit-box-orient: vertical;

File diff suppressed because one or more lines are too long

View file

@ -504,3 +504,4 @@
- Added support for horizontal and non-responsive tables in the `table` module. Added lots of new variables and rules as needed.
- Tested new `table` module functionality thoroughly. Everything seems to work like a charm, even if the implementation is a little bit fiddly due to flexbox playing some tricks.
- Updated a few colors for consistency.
- Added support for `striped` `table`s in the `table` module. Updated accordingly with variables and the likes.

View file

@ -75,7 +75,7 @@
</div>
<!-- Insert your page content here-->
<main><div class="container" style="padding-top: 20px;">
<table>
<table class="striped">
<caption>Hacker List</caption>
<thead>
<tr>

View file

@ -286,6 +286,9 @@ $table-mobile-label-font-weight:$bold-font-weight; // Font weight for mob
$table-horizontal-breakpoint: 768px; // Breakpoint for <table> horizontal view
$table-horizontal-name: 'horizontal'; // Class name for <table> horizontal view
$table-not-responsive-name: 'preset'; // Class name for <table> non-responsive view
$table-striped-name: 'striped'; // Class name for striped <table>
$table-striped-alt-body-back-color: // Alternate background color for <td> in
#eeeeee; // striped <table>
// Notes:
// [1] - The attribute specified in $table-mobile-card-label must be added manually to each and every element in the table
// in order for their mobile headers to display properly.

View file

@ -270,4 +270,11 @@ $table-horizontal-name: 'horizontal' !default; // Class name for table h
}
}
}
// Striped tables.
$table-striped-name: 'striped' !default; // Class name for striped table
table.#{$table-striped-name} {
tr:nth-of-type(2n) > td {
background: $table-striped-alt-body-back-color;
}
}