-
Notifications
You must be signed in to change notification settings - Fork 2
/
barchart.css
111 lines (95 loc) · 1.9 KB
/
barchart.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
.barchart {
display: flex;
border: 2px solid;
padding-right: 1rem;
padding-bottom: 1rem;
width: 90%;
height: 30em;
border-spacing: initial;
text-indent: initial;
box-sizing: initial;
border-collapse: initial;
text-align: center;
font-size: initial;
position: relative;
}
.barchart > caption {
display: block;
text-align: center;
font-size: initial;
position: absolute;
padding-top: 1rem;
width: 100%;
font-weight: bold;
}
.barchart > thead {
vertical-align: initial;
display: initial;
font-style: italic;
}
.barchart > thead > tr {
vertical-align: initial;
display: initial;
}
.barchart > thead > tr > th {
display: block;
font-weight: initial;
text-align: center;
position: absolute;
bottom: 0%;
width: 100%;
border: 1px dashed;
}
.barchart > thead > tr > * + th {
bottom: initial;
width: initial;
border: initial;
height: 100%;
display: flex;
align-items: center;
transform: translateX(-50%) rotate(-90deg) translateY(+1rem);
}
.barchart > tbody {
width: 100%;
height: calc(100% - 6rem);
left: 1rem;
position: relative;
margin-left: 2rem;
display: flex;
vertical-align: initial;
text-align: initial;
align-self: flex-end;
}
.barchart > tbody > tr {
padding-top: 1rem;
padding-bottom: 0;
width: 100%;
display: inline-block;
transform: rotate(180deg);
direction: rtl;
}
.barchart > tbody > tr > td {
border-width: initial;
border-style: initial;
text-align: center;
transform: rotate(-195deg);
font-size: xx-small;
display: table;
/* width: 0.1em; // TODO: flex */
position: relative;
font-style: normal;
margin-left: 0.2rem;
margin-right: 0.2rem;
padding-top: 0.2rem;
height: 4em;
}
.barchart > tbody > tr > * + td {
transform: rotate(-180deg);
font-size: smaller;
display: table;
width: 80%;
background-color: #0f0;
padding: 0.1rem;
margin-bottom: 1rem;
margin-top: 0.3rem;
}