Skip to content

Commit f096692

Browse files
committed
Update table.css
1 parent 1a0b270 commit f096692

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

css/components/table.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@
2525
/* Base Table Styles */
2626
.table {
2727
width: 100%;
28-
border-collapse: collapse;
28+
border-collapse: separate; /* Separate borders for smooth radius */
29+
border-spacing: 0; /* Removes spacing between cells */
2930
font-size: clamp(0.875rem, 1vw + 0.5rem, 1rem);
3031
color: var(--variant-text);
3132
background-color: var(--variant-bg);
33+
border-radius: var(--radius-lg);
34+
overflow: hidden; /* Applies border radius to entire table */
3235
min-width: min(100%, 600px);
3336
}
3437

3538
/* Table Head */
3639
.table th {
37-
background-color: var(--variant-light-bg);
38-
color: var(--variant-dark-bg);
40+
background-color: var(--variant-dark-bg);
41+
color: var(--variant-text);
3942
text-align: left;
4043
padding: clamp(var(--space-3), 1vw, var(--space-4));
4144
font-weight: 600;
@@ -56,9 +59,11 @@
5659
text-overflow: ellipsis;
5760
}
5861

59-
/* Hover Effect */
60-
.table tr:not([data-variant]) td:hover {
61-
background-color: var(--variant-hover-bg);
62+
/* Hover Effect for Rows */
63+
.table tr:hover td {
64+
background-color: var(--variant-dark-bg);
65+
cursor: pointer;
66+
transition: background-color 0.3s ease, color 0.3s ease;
6267
}
6368

6469
/* Striped Rows */
@@ -74,6 +79,7 @@
7479
[data-style="bordered"] td,
7580
[data-style="bordered"] th {
7681
border: 1px solid var(--variant-border);
82+
border-radius: var(--radius-sm);
7783
}
7884

7985
/* Curved Borders */

0 commit comments

Comments
 (0)