-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodern-table.css
141 lines (112 loc) · 2.77 KB
/
modern-table.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
* Stylesheet for:
* ModernTable Library
* Library for displaying a data table from a JSON source.
* @author SimpleNotSimpler
* @version 1.0.8
* @license MIT
*
*/
/**
* =============================================
* = CELL STYLES =
* =============================================
*
*/
.align-text-right {
text-align: right;
}
.align-text-left {
text-align: left;
}
.align-text-center {
text-align: center;
}
.mt-col-header-capitalize {
text-transform: capitalize;
}
/*===== End of CELL STYLES ======*/
/**
* =============================================
* = STICKY TABLE HEADER =
* =============================================
*
* Need the border-collapse: separate so that can continue to see borders in table head when have sticky header.
* Solution from:
* https://stackoverflow.com/questions/50361698/border-style-do-not-work-with-sticky-position-element
* answered Nov 30 '18 at 14:25
* blackheart
*
*/
.mt-table {
border-collapse: separate;
border-spacing: 0;
}
.mt-header-sticky {
top: 0px;
position: sticky;
}
/**
*
* Because sticky header makes the header background transparent, explicitly set this.
* Color can be inherited. Useful if use Bootstrap 4 class such as table-dark.
* However, table header background-ground color is not inheritable and must be explicitly set.
*
*/
.mt-thead-style {
color: black;
background-color: white;
}
/*===== End of STICKY TABLE HEADER ======*/
/**
* =============================================
* = TABLE CONTAINER =
* =============================================
*/
.mt-table-height {
height: 75vh;
display: block;
overflow-y: auto;
width: 100%;
}
/*===== End of Section TABLE CONTAINER ======*/
/**
* =============================================
* = TABLE CAPTION =
* =============================================
*
* Default Bootstrap 4 > caption-side: bottom.
* Set this explicitly to ensure caption at the top.
* Style so looks more like a title for table.
*/
.mt-caption {
caption-side: top;
text-align: center;
font-size: larger;
font-weight: bold;
color: black;
}
/*===== End of TABLE CAPTION ======*/
/**
* =============================================
* = TABLE ERROR =
* =============================================
*
*/
.table-error{
display: block;
}
.table-error h1 {
font-size: larger;
font-weight: bold;
}
.table-error h2 {
font-size: medium;
font-style: italic;
padding-bottom: 15px;
}
.table-error .table-error-details{
display: block;
margin-left: 1.5rem;
}
/*===== End of TABLE ERROR ======*/