|
186 | 186 |
|
187 | 187 | /* Table formatting for horizontal scrolling with column width control */ |
188 | 188 | .table-wrapper { |
189 | | - overflow-x: auto; |
| 189 | + overflow: auto; /* Enable both X and Y scrolling */ |
| 190 | + max-height: 85vh; /* Limit height to viewport to create scrolling context */ |
190 | 191 | width: 100%; |
| 192 | + margin-bottom: 1.5em; |
| 193 | + border: 1px solid var(--table-border-color); |
| 194 | + box-shadow: 0 2px 4px rgba(0,0,0,0.05); |
191 | 195 | } |
192 | 196 |
|
193 | 197 | .page-wrapper table { |
194 | 198 | width: 100%; |
195 | | - border-collapse: collapse; /* Ensure borders behave */ |
| 199 | + border-collapse: separate; /* Required for sticky borders in some browsers */ |
| 200 | + border-spacing: 0; |
196 | 201 | } |
197 | 202 |
|
198 | 203 | /* Sticky Table Headers */ |
|
203 | 208 | background-color: var(--bg); /* Ensure header isn't transparent */ |
204 | 209 | color: var(--fg); |
205 | 210 | border-bottom: 2px solid var(--table-border-color); |
206 | | - box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4); /* Optional: shadow to define header bottom */ |
| 211 | + box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4); |
| 212 | +} |
| 213 | + |
| 214 | +/* Sticky First Column (Optional: Improves readability for wide tables) */ |
| 215 | +.page-wrapper table tbody td:first-child, |
| 216 | +.page-wrapper table thead th:first-child { |
| 217 | + position: sticky; |
| 218 | + left: 0; |
| 219 | + background-color: var(--bg); |
| 220 | + z-index: 15; /* Below header, above content */ |
| 221 | + border-right: 1px solid var(--table-border-color); |
| 222 | +} |
| 223 | + |
| 224 | +/* Header of first column needs higher z-index to stay on top of both scrolls */ |
| 225 | +.page-wrapper table thead th:first-child { |
| 226 | + z-index: 30; |
207 | 227 | } |
208 | 228 |
|
209 | 229 | /* Widen the main content area to fill the screen */ |
|
0 commit comments