File tree Expand file tree Collapse file tree 5 files changed +68
-31
lines changed Expand file tree Collapse file tree 5 files changed +68
-31
lines changed Original file line number Diff line number Diff line change 1
1
.idea /
2
2
bower_components /
3
3
node_modules /
4
+ commit.txt
Original file line number Diff line number Diff line change 5
5
< script src ="../release/angular-responsive-tables.js "> </ script >
6
6
< script src ="controller.js "> </ script >
7
7
< link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css ">
8
- < link rel ="stylesheet " href ="../src/style .css ">
8
+ < link rel ="stylesheet " href ="../release/angular-responsive-tables .css ">
9
9
</ head >
10
10
< body ng-controller ="TestController as ctrl ">
11
11
< h1 > Angular Responsive Tables</ h1 >
Original file line number Diff line number Diff line change 11
11
/* table.responsive,*/
12
12
.responsive thead ,
13
13
.responsive tbody ,
14
- .responsive th ,
15
- .responsive td ,
16
- .responsive tr {
14
+ .responsive tr ,
15
+ .responsive th {
17
16
display : block;
18
17
}
19
18
20
- /* Hide table headers (but not display: none;, for accessibility) */
21
- .responsive thead tr {
22
- position : absolute;
23
- top : -9999px ;
24
- left : -9999px ;
25
- }
19
+ /* Hide table headers (but not display: none;, for accessibility) */
20
+ .responsive thead tr {
21
+ position : absolute;
22
+ top : -9999px ;
23
+ left : -9999px ;
24
+ }
26
25
27
- .responsive tr {
28
- border : 1px solid # ccc ;
29
- }
26
+ .responsive tr {
27
+ border : 1px solid # ccc ;
28
+ }
30
29
31
- .responsive td , .table . responsive td {
30
+ .responsive td : nth-child (odd) , .responsive td : nth-child (even) {
32
31
/* Behave like a "row" */
33
32
border : none;
34
33
border-bottom : 1px solid # eee ;
35
34
position : relative;
36
35
padding-left : 50% ;
37
36
white-space : normal;
38
37
text-align : left;
38
+
39
+ display : block;
40
+ -webkit-box-sizing : content-box;
41
+ -moz-box-sizing : content-box;
42
+ box-sizing : content-box;
43
+ min-height : 1em ;
39
44
}
40
45
41
- .responsive td : before {
46
+ .responsive td : nth-child (odd) : before , . responsive td : nth-child (even) : before {
42
47
/* Now like a table header */
43
48
position : absolute;
44
49
/* Top/left values mimic padding */
45
50
top : 6px ;
46
51
left : 6px ;
47
52
width : 45% ;
48
53
padding-right : 10px ;
49
- white-space : nowrap;
54
+ -ms-word-wrap : break-word;
55
+ word-wrap : break-word;
50
56
text-align : left;
51
57
font-weight : bold;
52
58
/*
53
59
Label the data
54
60
*/
55
61
content : attr (data-title);
56
62
}
63
+
64
+ .responsive td .responsive-omit-title : nth-child (odd), .responsive td .responsive-omit-title : nth-child (even) {
65
+ padding-left : 6px ;
66
+ }
67
+
68
+ .responsive td .responsive-omit-title : before {
69
+ display : none;
70
+ }
71
+
72
+ .responsive td .responsive-omit-if-empty : empty {
73
+ display : none;
74
+ }
57
75
}
Original file line number Diff line number Diff line change 11
11
/* table.responsive,*/
12
12
.responsive thead ,
13
13
.responsive tbody ,
14
- .responsive th ,
15
- .responsive td ,
16
- .responsive tr {
14
+ .responsive tr ,
15
+ .responsive th {
17
16
display : block;
18
17
}
19
18
20
- /* Hide table headers (but not display: none;, for accessibility) */
21
- .responsive thead tr {
22
- position : absolute;
23
- top : -9999px ;
24
- left : -9999px ;
25
- }
19
+ /* Hide table headers (but not display: none;, for accessibility) */
20
+ .responsive thead tr {
21
+ position : absolute;
22
+ top : -9999px ;
23
+ left : -9999px ;
24
+ }
26
25
27
- .responsive tr {
28
- border : 1px solid # ccc ;
29
- }
26
+ .responsive tr {
27
+ border : 1px solid # ccc ;
28
+ }
30
29
31
30
.responsive td : nth-child (odd), .responsive td : nth-child (even) {
32
31
/* Behave like a "row" */
36
35
padding-left : 50% ;
37
36
white-space : normal;
38
37
text-align : left;
38
+
39
+ display : block;
40
+ -webkit-box-sizing : content-box;
41
+ -moz-box-sizing : content-box;
42
+ box-sizing : content-box;
43
+ min-height : 1em ;
39
44
}
40
45
41
- .responsive td : before {
46
+ .responsive td : nth-child (odd) : before , . responsive td : nth-child (even) : before {
42
47
/* Now like a table header */
43
48
position : absolute;
44
49
/* Top/left values mimic padding */
45
50
top : 6px ;
46
51
left : 6px ;
47
52
width : 45% ;
48
53
padding-right : 10px ;
49
- white-space : nowrap;
54
+ -ms-word-wrap : break-word;
55
+ word-wrap : break-word;
50
56
text-align : left;
51
57
font-weight : bold;
52
58
/*
53
59
Label the data
54
60
*/
55
61
content : attr (data-title);
56
62
}
63
+
64
+ .responsive td .responsive-omit-title : nth-child (odd), .responsive td .responsive-omit-title : nth-child (even) {
65
+ padding-left : 6px ;
66
+ }
67
+
68
+ .responsive td .responsive-omit-title : before {
69
+ display : none;
70
+ }
71
+
72
+ .responsive td .responsive-omit-if-empty : empty {
73
+ display : none;
74
+ }
57
75
}
You can’t perform that action at this time.
0 commit comments