-
Notifications
You must be signed in to change notification settings - Fork 1
/
make-config-list-widget-mobile-responsive.css
65 lines (55 loc) · 1.42 KB
/
make-config-list-widget-mobile-responsive.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
/** CSS to customize Configurable List widget to make it two column for mobile view
* Author: Charmie Q;
* Date: 8/17/2017;
**/
.checkbox, .radio {
margin: 3px 0;
min-width: 70px;
}
/* Hide the original table headers, first row*/
#list > tbody > tr:nth-child(1) {
display: none !important;
}
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr {
border: 1px solid #ccc;
margin: 2px 2px;
}
td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 40%;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 35%;
padding-right: 10px;
white-space: nowrap;
}
/*
Re-label the columns here
*/
td:nth-of-type(1):before { content: "Check Box"; }
td:nth-of-type(2):before { content: "Radio Buttons"; }
td:nth-of-type(3):before { content: "Text Area"; }
td:nth-of-type(4):before { content: "Text Box"; }
td:nth-of-type(5):before { content: "Number"; }
td:nth-of-type(6):before { content: "Time"; }
td:nth-of-type(7):before { content: "Drop down"; }
td:nth-of-type(8):before { content: "Calendar"; }
td:nth-of-type(9):before { content: "Static Text"; }