|
2 | 2 | display: flex; |
3 | 3 | flex-direction: column; |
4 | 4 | align-items: center; |
5 | | - width: fit-content; |
6 | 5 | width: 90%; |
7 | 6 | overflow: visible; |
8 | 7 | } |
9 | 8 |
|
10 | | -.chartWrapper { |
11 | | - overflow-x: visible; |
12 | | - overflow-y: visible; |
| 9 | +.chartOuter { |
| 10 | + overflow: visible; /* popovers must escape here */ |
13 | 11 | width: 100%; |
| 12 | + position: relative; |
14 | 13 | } |
15 | 14 |
|
16 | | -@media only screen and (max-width: 1180px) { |
17 | | - .clBox { |
18 | | - width: 95vw !important; |
19 | | - } |
| 15 | +.chartScroll { |
| 16 | + overflow: visible; /* default for desktop */ |
| 17 | + width: 100%; |
20 | 18 | } |
21 | 19 |
|
22 | 20 | @media only screen and (max-width: 768px) { |
23 | | - .chart { |
24 | | - grid-template-columns: repeat(53, 20px) !important; /* 53 weeks */ |
| 21 | + .chartScroll { |
| 22 | + overflow-x: scroll; /* horizontal scroll only */ |
| 23 | + overflow-y: visible; /* critical: popovers can go UP */ |
25 | 24 | } |
26 | | - .chart::-webkit-scrollbar-track { |
27 | | - background-color: #0f1019; /* track background */ |
| 25 | + |
| 26 | + .chartScroll::-webkit-scrollbar-track { |
| 27 | + background-color: #0f1019; |
28 | 28 | border-radius: 6px; |
29 | 29 | } |
30 | | - .chartWrapper { |
31 | | - overflow-x: scroll; |
| 30 | +} |
| 31 | + |
| 32 | +@media only screen and (max-width: 1180px) { |
| 33 | + .clBox { |
| 34 | + width: 95vw !important; |
32 | 35 | } |
33 | 36 | } |
34 | 37 |
|
35 | 38 | .clBox { |
36 | 39 | display: flex; |
37 | 40 | flex-direction: column; |
38 | 41 | align-items: center; |
39 | | - width: fit-content; |
40 | 42 | width: 80%; |
41 | 43 | overflow: visible; |
42 | 44 | } |
|
45 | 47 | display: grid; |
46 | 48 | justify-content: center; |
47 | 49 | align-items: center; |
48 | | - grid-template-columns: repeat(53, 1fr); /* 53 weeks */ |
| 50 | + grid-template-columns: repeat(53, 1fr); |
49 | 51 | gap: 2px; |
50 | 52 | width: 100%; |
51 | 53 | overflow: visible; |
52 | 54 | } |
| 55 | + |
| 56 | +@media only screen and (max-width: 768px) { |
| 57 | + .chart { |
| 58 | + grid-template-columns: repeat(53, 20px) !important; |
| 59 | + } |
| 60 | +} |
| 61 | + |
53 | 62 | .dayWrapper { |
54 | 63 | position: relative; |
| 64 | + overflow: visible !important; /* safety */ |
| 65 | +} |
55 | 66 |
|
56 | | - .day { |
57 | | - border-radius: 2px; |
58 | | - transition: background-color 0.2s; |
59 | | - cursor: pointer; |
60 | | - width: inherit; |
61 | | - height: auto; |
62 | | - aspect-ratio: 1/1; |
63 | | - } |
| 67 | +.dayWrapper .day { |
| 68 | + border-radius: 2px; |
| 69 | + transition: background-color 0.2s; |
| 70 | + cursor: pointer; |
| 71 | + width: inherit; |
| 72 | + height: auto; |
| 73 | + aspect-ratio: 1/1; |
| 74 | +} |
64 | 75 |
|
65 | | - .day:hover { |
66 | | - outline: 1px solid #333; |
67 | | - } |
| 76 | +.dayWrapper .day:hover { |
| 77 | + outline: 1px solid #333; |
| 78 | +} |
68 | 79 |
|
69 | | - .day:hover::after { |
70 | | - content: attr(title); |
71 | | - position: absolute; |
72 | | - left: 50%; |
73 | | - bottom: 100%; |
74 | | - transform: translateX(-50%); |
75 | | - white-space: pre; // preserves line breaks |
76 | | - background: #1a1a2e; |
77 | | - color: #fff; |
78 | | - padding: 4px 8px; |
79 | | - border-radius: 4px; |
80 | | - font-size: 12px; |
81 | | - pointer-events: none; |
82 | | - z-index: 10; |
83 | | - text-transform: capitalize; |
84 | | - overflow: visible !important; |
85 | | - } |
| 80 | +.dayWrapper .day:hover::after { |
| 81 | + content: attr(title); |
| 82 | + position: absolute; |
| 83 | + left: 50%; |
| 84 | + bottom: 100%; |
| 85 | + transform: translateX(-50%); |
| 86 | + white-space: pre; |
| 87 | + background: #1a1a2e; |
| 88 | + color: #fff; |
| 89 | + padding: 4px 8px; |
| 90 | + border-radius: 4px; |
| 91 | + font-size: 12px; |
| 92 | + pointer-events: none; |
| 93 | + z-index: 9999; |
| 94 | + overflow: visible !important; |
86 | 95 | } |
87 | 96 |
|
88 | 97 | .legend { |
89 | 98 | display: flex; |
90 | | - justify-content: center; // center the legend |
| 99 | + justify-content: center; |
91 | 100 | align-items: center; |
92 | 101 | align-self: flex-start; |
93 | 102 | margin-top: 16px; |
| 103 | +} |
94 | 104 |
|
95 | | - .legendItem { |
96 | | - display: flex; |
97 | | - flex-direction: column; |
98 | | - align-items: center; |
99 | | - margin: 0 4px; |
100 | | - |
101 | | - .legendColor { |
102 | | - width: 14px; |
103 | | - height: 14px; |
104 | | - border-radius: 2px; |
105 | | - margin-bottom: 2px; |
106 | | - } |
107 | | - |
108 | | - span { |
109 | | - font-size: 12px; |
110 | | - } |
111 | | - } |
| 105 | +.legend .legendItem { |
| 106 | + display: flex; |
| 107 | + flex-direction: column; |
| 108 | + align-items: center; |
| 109 | + margin: 0 4px; |
| 110 | +} |
| 111 | + |
| 112 | +.legend .legendColor { |
| 113 | + width: 14px; |
| 114 | + height: 14px; |
| 115 | + border-radius: 2px; |
| 116 | + margin-bottom: 2px; |
| 117 | +} |
| 118 | + |
| 119 | +.legend span { |
| 120 | + font-size: 12px; |
112 | 121 | } |
113 | 122 |
|
114 | 123 | .box { |
|
131 | 140 | display: grid; |
132 | 141 | place-items: center; |
133 | 142 | transition: 0.3s; |
134 | | - background-color: #1a1b2b; // subtle background for better contrast |
| 143 | + background-color: #1a1b2b; |
135 | 144 | } |
136 | 145 |
|
137 | 146 | .elementBox p { |
138 | 147 | font-size: 1.2em; |
139 | 148 | text-align: center !important; |
140 | 149 | text-transform: capitalize; |
141 | | - padding: 0; |
142 | 150 | margin-top: 2px; |
143 | 151 | } |
144 | 152 |
|
|
155 | 163 | text-transform: capitalize; |
156 | 164 | } |
157 | 165 |
|
158 | | -.elementBox ul li { |
159 | | - text-transform: capitalize; |
160 | | -} |
161 | | - |
162 | 166 | .elementBox:hover { |
163 | 167 | box-shadow: 16px 16px 16px rgba(0, 0, 0, 0.6); |
164 | 168 | transform: scale(1.02); |
165 | 169 | } |
166 | | - |
167 | | -.elementBox ul { |
168 | | - margin-top: 0.5em; |
169 | | - padding-left: 0; |
170 | | - list-style: none; |
171 | | -} |
0 commit comments