1
0
mirror of https://github.com/Chalarangelo/mini.css.git synced 2025-08-07 14:26:28 +02:00

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; } text-align: right; }
table.horizontal.preset tbody tr:first-child > td { table.horizontal.preset tbody tr:first-child > td {
padding-left: 20px; } } padding-left: 20px; } }
table.striped tr:nth-of-type(2n) > td {
background: #eeeeee; }
.card { .card {
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -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. - 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. - 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. - 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> </div>
<!-- Insert your page content here--> <!-- Insert your page content here-->
<main><div class="container" style="padding-top: 20px;"> <main><div class="container" style="padding-top: 20px;">
<table> <table class="striped">
<caption>Hacker List</caption> <caption>Hacker List</caption>
<thead> <thead>
<tr> <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-breakpoint: 768px; // Breakpoint for <table> horizontal view
$table-horizontal-name: 'horizontal'; // Class name 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-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: // Notes:
// [1] - The attribute specified in $table-mobile-card-label must be added manually to each and every element in the table // [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. // 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;
}
} }