1
0
mirror of https://github.com/Chalarangelo/mini.css.git synced 2025-08-29 08:40:16 +02:00

Table desktop view

This commit is contained in:
Angelos Chalaris
2018-01-02 14:29:21 +02:00
parent 4f38c8f6ec
commit 3a8fb37b20
5 changed files with 220 additions and 1 deletions

95
dist/mini-default.css vendored
View File

@@ -1680,3 +1680,98 @@ progress.tertiary {
.spinner.tertiary {
--spinner-fore-color: #308732;
}
/*
Definitions for the responsive table component.
*/
/*
$table-mobile-breakpoint: 767px !default; // Breakpoint for table mobile view.
$table-mobile-card-spacing: 10px !default; // Space between <tr> cards - mobile view.
$table-mobile-card-label: 'data-label' !default;// Attribute used to replace column headers in mobile view.
$table-not-responsive-name: 'preset' !default; // Class name for table non-responsive view.
$include-horizontal-table: true !default; // Should horizontal tables be included? (`true`/`false`)
$table-horizontal-name: 'horizontal' !default;// Class name for table horizontal view.
$include-scrollable-table: true !default; // Should scrollable tables be included? (`true`/`false`)
$table-scrollable-name: 'scrollable' !default;// Class name for table scrollable view.
$table-scrollable-height: 400px !default; // Height for table scrollable view.
$include-striped-table: true !default; // [Hidden flag] Should striped tables be included? (`true`/`false`)
$table-striped-name: 'striped' !default; // Class name for striped table.
// External variables' defaults are used only if you import this module on its own, without the rest of the framework.
$back-color: white !default; // [External variable - core] Background color for everything.
$fore-color: black !default; // [External variable - core] Foreground color for everything.
*/
/* Table module CSS variable definitions. */
:root {
--table-border-color: #aaa;
}
table {
border-collapse: separate;
border-spacing: 0;
margin: 0;
display: flex;
flex: 0 1 auto;
flex-flow: row wrap;
padding: var(--universal-padding);
padding-top: 0;
overflow: auto;
max-height: 400px;
}
table caption {
font-size: 1.5rem;
margin: calc(2 * var(--universal-margin)) 0;
max-width: 100%;
flex: 0 0 100%;
}
table thead, table tbody {
display: flex;
max-width: 100%;
flex-flow: row wrap;
flex: 0 0 100%;
border: 0.0625rem solid var(--table-border-color);
}
table thead {
z-index: 999;
position: sticky;
top: 0;
border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0;
border-bottom: 0.0625rem solid #666;
}
table tbody {
border-top: 0;
margin-top: calc(0 - var(--universal-margin));
border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius);
}
table tr {
display: flex;
flex-flow: row wrap;
flex: 0 0 100%;
padding: 0;
}
table th, table td {
padding: calc(2 * var(--universal-margin));
flex: 1 0 0%;
overflow: hidden;
text-overflow: ellipsis;
}
table th {
text-align: left;
background: #e6e6e6;
color: #111;
}
table td {
background: #fafafa;
border-top: 0.0625rem solid var(--table-border-color);
}
table tbody tr:first-child td {
border-top: 0;
}

File diff suppressed because one or more lines are too long