JSFiddle - React, Tailwind, and code Playground

by houmie

HTML

<table class="cb_table-hover">
    <tbody>
        <tr>
            <th>hover selector applies to this th</th>
        </tr>
        <tr>
            <th>
                <div class="override_me">hover selector does NOT apply to this th</div>
            </th>
        </tr>
        <tr>
            <td>hover selector applies to this td</td>
        </tr>
        <tr>
            <td>
                <div class="override_me">hover selector does NOT apply to this td</div>
            </td>
        </tr>
    </tbody>
</table>

CSS

.cb_table-hover tbody tr:hover td div:not(.override_me) ,
.cb_table-hover tbody tr:hover th div:not(.override_me) {
  background-color: #cfe2e8;  
}