I've implemented this combination of HTML and CSS to generate a table with grouped rows where both the group and individual rows respond to hover events:
.c-table-display {
border-spacing: 1px;
border-bottom: 1px solid #dedede;
width: 100%;
}
.c-table-display__row-odd {
background-color: #f3f7fc;
color: #263340;
font-size: 12px;
font-weight: normal;
height: 20px;
text-align: left;
}
.c-table-display__row-odd>td {
vertical-align: middle;
padding: 0 4px;
}
.c-table-display__row-even {
background-color: #deecf8;
color: #263340;
font-size: 12px;
font-weight: normal;
height: 20px;
text-align: left;
}
.c-table-display__row-even>td {
vertical-align: middle;
padding: 0 4px;
}
.c-table-display__body--highlightable:hover tr {
cursor: pointer;
background: #E3EBDE;
}
tr.c-table-display__row--highlightable:hover {
background: #FFE56F;
cursor: pointer;
}
.c-table-display__body--highlightable:hover td {
vertical-align: middle;
padding: 0 4px;
}
.c-table-display__row--highlightabe:hover td {
vertical-align: middle;
padding: 0 4px;
}
.c-table-display__cell--icon {
text-align: center;
}
.c-table-display__cell--icon>img {
vertical-align: middle;
}
<table class="u-width-full c-table-display">
<tbody class="c-table-display__body c-table-display__body--highlightable">
<tr class="c-table-display__row-odd c-table-display__row c-table-display__row--highlightable js-machine-param-row" machinerowid="17" parameterrowid="102">
<td>'test</td>
<td title="unique">
unique
</td>
<td title="">
</td>
<td title="">
</td>
<td class="c-table-display__cell c-table-display__cell--icon">
</td>
<td class="c-table-display__cell c-table-display__cell--icon">
</td>
<td class="c-table-display__cell c-table-display__cell--icon">
</td>
</tr>
<tr class="c-table-display__row-even c-table-display__row c-table-display__row--highlightable js-machine-param-row" machinerowid="17" parameterrowid="113">
<td title="keykeykeyke..... (content omitted for brevity)
</td>
<td title="valuevaluev... (content omitted for brevity)
</td>
<td title="keykeyk....</td>
<td class="c-table-display__cell c-table-display__cell--icon">
</td>
<td class="c-table-display__cell c-table-display__cell--icon">
</td>
<td class="c-table-display__cell c-table-display__cell--icon">
</td>
</tr>
</tbody>
</table>
The issue I'm encountering is that when hovering over the space between two cells, neither the row nor the group receives the hover effect. Is there a solution to address this without removing the border-spacing? I prefer not to rely on Javascript due to past issues with lingering hover effects caused by a previous Javascript implementation.