|
4 | 4 | border-spacing: 0;
|
5 | 5 | }
|
6 | 6 |
|
| 7 | +/* Main container styling to prevent black space */ |
7 | 8 | .table-wrapper {
|
| 9 | + width: 100%; |
| 10 | + border-radius: 12px; |
| 11 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 12 | + /* Remove overflow-x from wrapper to prevent black space */ |
| 13 | + margin: 0; |
| 14 | + padding: 0 ; |
| 15 | + /* Ensure proper height */ |
| 16 | + height: auto; |
| 17 | + min-height: 0; |
| 18 | + /* Prevent any overflow issues */ |
| 19 | + overflow: visible; |
| 20 | +} |
| 21 | + |
| 22 | +/* Responsive table container */ |
| 23 | +.table-responsive-container { |
8 | 24 | width: 100%;
|
9 | 25 | overflow-x: auto;
|
10 | 26 | -webkit-overflow-scrolling: touch;
|
11 | 27 | border-radius: 12px;
|
12 |
| - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 28 | + /* Show scrollbar */ |
| 29 | + scrollbar-width: thin; |
| 30 | + scrollbar-color: #c1c1c1 #f1f1f1; |
| 31 | + /* Prevent extra space */ |
| 32 | + margin: 0; |
| 33 | + padding: 0; |
| 34 | + /* Prevent vertical overflow */ |
| 35 | + overflow-y: hidden; |
| 36 | + /* Ensure proper height */ |
| 37 | + height: auto; |
| 38 | + min-height: 0; |
| 39 | + /* Ensure horizontal scroll works properly */ |
| 40 | + white-space: nowrap; |
| 41 | +} |
| 42 | + |
| 43 | +/* Custom scrollbar styling */ |
| 44 | +.table-responsive-container::-webkit-scrollbar { |
| 45 | + height: 8px; |
| 46 | +} |
| 47 | + |
| 48 | +.table-responsive-container::-webkit-scrollbar-track { |
| 49 | + background: #f1f1f1; |
| 50 | + border-radius: 4px; |
| 51 | +} |
| 52 | + |
| 53 | +.table-responsive-container::-webkit-scrollbar-thumb { |
| 54 | + background: #c1c1c1; |
| 55 | + border-radius: 4px; |
| 56 | +} |
| 57 | + |
| 58 | +.table-responsive-container::-webkit-scrollbar-thumb:hover { |
| 59 | + background: #a8a8a8; |
13 | 60 | }
|
14 | 61 |
|
15 | 62 | /* Ensure table container maintains proper spacing */
|
|
21 | 68 | padding: 0;
|
22 | 69 | }
|
23 | 70 |
|
| 71 | +/* Ensure no extra space from table elements */ |
| 72 | +.main-table-container * { |
| 73 | + box-sizing: border-box; |
| 74 | +} |
| 75 | + |
| 76 | +/* Ensure pagination doesn't create extra space */ |
| 77 | +.table-wrapper > div:last-child { |
| 78 | + margin-bottom: 0; |
| 79 | + padding-bottom: 0; |
| 80 | + /* Ensure pagination maintains its layout on smaller screens */ |
| 81 | + min-width: 1200px; /* Match table minimum width */ |
| 82 | + overflow-x: auto; /* Allow horizontal scroll if needed */ |
| 83 | +} |
| 84 | + |
24 | 85 | .main-table-container {
|
25 | 86 | width: 100%;
|
26 | 87 | border: 1px solid #d9d9d9;
|
|
30 | 91 | border-radius: 12px;
|
31 | 92 | overflow: hidden;
|
32 | 93 | table-layout: fixed;
|
| 94 | + min-width: 1200px; /* Increased minimum width to ensure all content fits properly */ |
| 95 | + margin: 0; /* Remove any margin */ |
| 96 | + padding: 0; /* Remove any padding */ |
33 | 97 | }
|
34 | 98 |
|
35 | 99 | /* Ensure table cells don't wrap content */
|
|
38 | 102 | white-space: nowrap;
|
39 | 103 | overflow: hidden;
|
40 | 104 | text-overflow: ellipsis;
|
| 105 | + /* Prevent content from being truncated */ |
| 106 | + min-width: 0; |
41 | 107 | }
|
42 | 108 |
|
43 | 109 | /* Column width distribution - spread across full width with end spacing for actions */
|
|
144 | 210 | vertical-align: middle;
|
145 | 211 | box-sizing: border-box;
|
146 | 212 | text-align: left;
|
| 213 | + white-space: nowrap; |
| 214 | + overflow: hidden; |
| 215 | + text-overflow: ellipsis; |
| 216 | + min-width: 120px; /* Increased minimum width to prevent content trimming */ |
147 | 217 | }
|
148 | 218 |
|
149 | 219 | .main-table-container tr:last-child td {
|
|
178 | 248 | align-items: center;
|
179 | 249 | padding: 1rem;
|
180 | 250 | gap: 1rem;
|
| 251 | + flex-wrap: nowrap; /* Prevent wrapping on larger screens */ |
181 | 252 | }
|
182 | 253 |
|
183 | 254 | .search-bar-left {
|
184 | 255 | display: flex;
|
185 | 256 | align-items: center;
|
186 | 257 | gap: 1rem;
|
187 | 258 | flex: 1;
|
| 259 | + min-width: 0; /* Allow shrinking */ |
188 | 260 | }
|
189 | 261 |
|
190 | 262 | .search-bar-right {
|
191 | 263 | display: flex;
|
192 | 264 | gap: 0.5rem;
|
193 |
| - flex-shrink: 0; |
| 265 | + flex-shrink: 0; /* Prevent shrinking */ |
| 266 | + align-items: center; |
194 | 267 | }
|
195 | 268 |
|
196 | 269 | .table-title-container {
|
197 | 270 | display: flex;
|
198 | 271 | flex-direction: column;
|
199 | 272 | gap: 0.25rem;
|
| 273 | + flex-shrink: 0; /* Prevent title from shrinking */ |
200 | 274 | }
|
201 | 275 |
|
202 | 276 | .table-subtitle {
|
|
211 | 285 | position: relative;
|
212 | 286 | width: 100%;
|
213 | 287 | height: 48px;
|
214 |
| - min-width: 0; |
| 288 | + min-width: 200px; /* Minimum width for search */ |
215 | 289 | max-width: 400px;
|
216 | 290 | flex: 1;
|
| 291 | + min-width: 0; /* Allow shrinking below 200px when needed */ |
217 | 292 | }
|
218 | 293 |
|
219 | 294 | .search-input-icon {
|
|
250 | 325 | opacity: 1;
|
251 | 326 | }
|
252 | 327 |
|
253 |
| -/* Responsive design with better breakpoints */ |
| 328 | +/* Responsive design with comprehensive breakpoints */ |
254 | 329 | @media (max-width: 768px) {
|
| 330 | + /* Tablet and smaller - Title on first line, search bar and buttons on second line */ |
255 | 331 | .search-bar-container {
|
256 | 332 | flex-direction: column;
|
257 | 333 | align-items: stretch;
|
| 334 | + gap: 1rem; |
258 | 335 | }
|
259 | 336 |
|
260 | 337 | .search-bar-left {
|
261 |
| - flex-direction: column; |
262 |
| - align-items: stretch; |
| 338 | + width: 100%; |
263 | 339 | }
|
264 | 340 |
|
| 341 | + .search-bar-right { |
| 342 | + width: 100%; |
| 343 | + justify-content: space-between; |
| 344 | + gap: 1rem; |
| 345 | + } |
| 346 | + |
265 | 347 | .search-input-container {
|
266 | 348 | max-width: none;
|
| 349 | + min-width: 200px; |
| 350 | + flex: 1; |
| 351 | + } |
| 352 | + |
| 353 | + |
| 354 | + /* Ensure table scrolls horizontally on mobile */ |
| 355 | + .table-responsive-container { |
| 356 | + overflow-x: auto; |
| 357 | + min-width: 1200px; /* Match table minimum width */ |
| 358 | + } |
| 359 | + |
| 360 | + /* Ensure table headers and cells don't break */ |
| 361 | + .main-table-container th, |
| 362 | + .main-table-container td { |
| 363 | + white-space: nowrap; |
| 364 | + overflow: hidden; |
| 365 | + text-overflow: ellipsis; |
| 366 | + min-width: 120px; /* Minimum width for mobile */ |
| 367 | + } |
| 368 | + |
| 369 | + /* Adjust column widths for mobile - maintain exact same proportions */ |
| 370 | + .main-table-container th:nth-child(1), |
| 371 | + .main-table-container td:nth-child(1) { |
| 372 | + min-width: 264px; /* Resource Type - 22% of 1200px */ |
| 373 | + } |
| 374 | + |
| 375 | + .main-table-container th:nth-child(2), |
| 376 | + .main-table-container td:nth-child(2) { |
| 377 | + min-width: 216px; /* Name - 18% of 1200px */ |
| 378 | + } |
| 379 | + |
| 380 | + .main-table-container th:nth-child(3), |
| 381 | + .main-table-container td:nth-child(3) { |
| 382 | + min-width: 216px; /* Date & Time - 18% of 1200px */ |
| 383 | + } |
| 384 | + |
| 385 | + .main-table-container th:nth-child(4), |
| 386 | + .main-table-container td:nth-child(4) { |
| 387 | + min-width: 144px; /* Status - 12% of 1200px */ |
267 | 388 | }
|
268 | 389 |
|
| 390 | + .main-table-container th:nth-child(5), |
| 391 | + .main-table-container td:nth-child(5) { |
| 392 | + min-width: 144px; /* Orchestration - 12% of 1200px */ |
| 393 | + } |
| 394 | + |
| 395 | + .main-table-container th:nth-child(6), |
| 396 | + .main-table-container td:nth-child(6) { |
| 397 | + min-width: 96px; /* Actions - 8% of 1200px */ |
| 398 | + } |
| 399 | +} |
| 400 | + |
| 401 | +/* Small mobile devices */ |
| 402 | +@media (max-width: 480px) { |
| 403 | + .search-bar-container { |
| 404 | + padding: 0.75rem; |
| 405 | + gap: 0.75rem; |
| 406 | + } |
| 407 | + |
| 408 | + .search-bar-left { |
| 409 | + width: 100%; |
| 410 | + } |
| 411 | + |
| 412 | + .search-bar-right { |
| 413 | + width: 100%; |
| 414 | + justify-content: space-between; |
| 415 | + gap: 0.5rem; |
| 416 | + } |
| 417 | + |
| 418 | + .search-input-container { |
| 419 | + height: 44px; /* Slightly smaller on very small screens */ |
| 420 | + min-width: 120px; /* Further reduced minimum width for very small screens */ |
| 421 | + flex: 1; |
| 422 | + } |
| 423 | + |
| 424 | + .search-input { |
| 425 | + height: 44px; |
| 426 | + font-size: 13px; |
| 427 | + } |
| 428 | +} |
| 429 | + |
| 430 | +/* ≤ 1024 px – turn the whole header into a 2‑row grid */ |
| 431 | +@media (max-width: 1024px) { |
| 432 | + .search-bar-container { |
| 433 | + display: grid; |
| 434 | + grid-template-columns: 1fr auto; /* search grows, buttons = auto */ |
| 435 | + grid-template-areas: |
| 436 | + "title title" /* row 1: title full‑width */ |
| 437 | + "search buttons"; /* row 2: search + buttons */ |
| 438 | + gap: 1rem; |
| 439 | + align-items: center; |
| 440 | + } |
| 441 | + |
| 442 | + /* let the children of .search-bar-left take part in the grid */ |
| 443 | + .search-bar-left { |
| 444 | + display: contents; /* no box of its own */ |
| 445 | + } |
| 446 | + |
| 447 | + /* name each piece */ |
| 448 | + .table-title-container { grid-area: title; } |
| 449 | + .search-input-container { grid-area: search; } |
| 450 | + |
| 451 | + /* push buttons to the right */ |
269 | 452 | .search-bar-right {
|
270 |
| - justify-content: center; |
| 453 | + grid-area: buttons; |
| 454 | + justify-self: end; /* align right edge */ |
| 455 | + } |
| 456 | +} |
| 457 | + |
| 458 | +/* Large desktop breakpoint */ |
| 459 | +@media (min-width: 1025px) { |
| 460 | + .search-bar-container { |
| 461 | + flex-direction: row; |
| 462 | + align-items: center; |
| 463 | + } |
| 464 | +} |
| 465 | + |
| 466 | +/* Tablet and smaller breakpoint */ |
| 467 | +@media (max-width: 1024px) { |
| 468 | + .search-bar-container > * { |
| 469 | + margin-bottom: 0.5rem; |
| 470 | + } |
| 471 | + |
| 472 | + .search-bar-left, |
| 473 | + .search-bar-right { |
| 474 | + width: 100%; |
| 475 | + } |
| 476 | +} |
| 477 | + |
| 478 | +@media (max-width: 768px) { |
| 479 | + .search-input-container { |
| 480 | + max-width: 350px; |
| 481 | + } |
| 482 | +} |
| 483 | + |
| 484 | +/* Medium desktop breakpoint */ |
| 485 | +@media (max-width: 1200px) and (min-width: 1025px) { |
| 486 | + .search-input-container { |
| 487 | + max-width: 350px; /* Slightly reduced for medium screens */ |
| 488 | + } |
| 489 | + |
| 490 | + .table-responsive-container { |
| 491 | + overflow-x: auto; |
| 492 | + min-width: 1200px; /* Match table minimum width */ |
| 493 | + } |
| 494 | + |
| 495 | + .main-table-container th, |
| 496 | + .main-table-container td { |
| 497 | + white-space: nowrap; |
| 498 | + overflow: hidden; |
| 499 | + text-overflow: ellipsis; |
271 | 500 | }
|
272 | 501 | }
|
0 commit comments