Skip to content

Commit 7b8205f

Browse files
committed
feat: Table row responsive style
1 parent 93e5c8d commit 7b8205f

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/styles/MultiLevelTable.css

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
/* Ensure proper height */
3737
height: auto;
3838
min-height: 0;
39+
/* Ensure horizontal scroll works properly */
40+
white-space: nowrap;
3941
}
4042

4143
/* Custom scrollbar styling */
@@ -86,7 +88,7 @@
8688
border-radius: 12px;
8789
overflow: hidden;
8890
table-layout: fixed;
89-
min-width: 900px; /* Ensure minimum width to prevent content trimming */
91+
min-width: 1200px; /* Increased minimum width to ensure all content fits properly */
9092
margin: 0; /* Remove any margin */
9193
padding: 0; /* Remove any padding */
9294
}
@@ -97,6 +99,8 @@
9799
white-space: nowrap;
98100
overflow: hidden;
99101
text-overflow: ellipsis;
102+
/* Prevent content from being truncated */
103+
min-width: 0;
100104
}
101105

102106
/* Column width distribution - spread across full width with end spacing for actions */
@@ -206,7 +210,7 @@
206210
white-space: nowrap;
207211
overflow: hidden;
208212
text-overflow: ellipsis;
209-
min-width: 100px; /* Minimum width to prevent content trimming */
213+
min-width: 120px; /* Increased minimum width to prevent content trimming */
210214
}
211215

212216
.main-table-container tr:last-child td {
@@ -347,7 +351,7 @@
347351
/* Ensure table scrolls horizontally on mobile */
348352
.table-responsive-container {
349353
overflow-x: auto;
350-
min-width: 900px; /* Match table minimum width */
354+
min-width: 1200px; /* Match table minimum width */
351355
}
352356

353357
/* Ensure table headers and cells don't break */
@@ -359,35 +363,35 @@
359363
min-width: 120px; /* Minimum width for mobile */
360364
}
361365

362-
/* Adjust column widths for mobile */
366+
/* Adjust column widths for mobile - maintain exact same proportions */
363367
.main-table-container th:nth-child(1),
364368
.main-table-container td:nth-child(1) {
365-
min-width: 150px; /* Resource Type */
369+
min-width: 264px; /* Resource Type - 22% of 1200px */
366370
}
367371

368372
.main-table-container th:nth-child(2),
369373
.main-table-container td:nth-child(2) {
370-
min-width: 120px; /* Name */
374+
min-width: 216px; /* Name - 18% of 1200px */
371375
}
372376

373377
.main-table-container th:nth-child(3),
374378
.main-table-container td:nth-child(3) {
375-
min-width: 140px; /* Date & Time */
379+
min-width: 216px; /* Date & Time - 18% of 1200px */
376380
}
377381

378382
.main-table-container th:nth-child(4),
379383
.main-table-container td:nth-child(4) {
380-
min-width: 100px; /* Status */
384+
min-width: 144px; /* Status - 12% of 1200px */
381385
}
382386

383387
.main-table-container th:nth-child(5),
384388
.main-table-container td:nth-child(5) {
385-
min-width: 120px; /* Orchestration */
389+
min-width: 144px; /* Orchestration - 12% of 1200px */
386390
}
387391

388392
.main-table-container th:nth-child(6),
389393
.main-table-container td:nth-child(6) {
390-
min-width: 100px; /* Actions */
394+
min-width: 96px; /* Actions - 8% of 1200px */
391395
}
392396
}
393397

@@ -482,6 +486,7 @@
482486

483487
.table-responsive-container {
484488
overflow-x: auto;
489+
min-width: 1200px; /* Match table minimum width */
485490
}
486491

487492
.main-table-container th,

0 commit comments

Comments
 (0)