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