Skip to content

Commit 0a71e73

Browse files
committed
Fix table row jump on hover
1 parent 97bcbf5 commit 0a71e73

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

sass/layout/_tables.scss

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,33 @@ table {
5252
}
5353

5454
&.striped {
55-
tbody tr td {
56-
border: none;
57-
}
55+
tbody tr {
56+
transition: background-color 0.3s ease;
5857

59-
tbody tr:nth-child(even) {
60-
background: $bg-gray-lighter;
61-
border-bottom: 1px dotted $bg-gray-light;
62-
transition: background-color 0.4s ease
63-
}
58+
td {
59+
border-bottom: none;
60+
padding: 0.6rem 1rem 0.5rem 1rem;
61+
}
6462

65-
tbody tr:nth-child(even):hover {
66-
background-color: #e1dae5;
67-
cursor: pointer;
68-
}
63+
&:nth-child(even) {
64+
background: $bg-gray-lighter;
65+
border-bottom: 1px dotted $bg-gray-light;
66+
67+
&:hover {
68+
background-color: #e1dae5;
69+
cursor: pointer;
70+
}
71+
}
6972

70-
tbody tr:nth-child(odd):hover {
71-
background: #f5f0e3;
72-
cursor: pointer;
73-
border-bottom: 1px dotted $bg-gray-light;
73+
&:nth-child(odd) {
74+
border-bottom: 1px solid transparent;
75+
76+
&:hover {
77+
background: #f5f0e3;
78+
border-bottom: 1px dotted $bg-gray-light;
79+
cursor: pointer;
80+
}
81+
}
7482
}
7583
}
7684
}

0 commit comments

Comments
 (0)