Repository navigation
[6.x] Hover fill on table rows - #20645
Conversation
Clickable data table rows only changed color once selected. A hovered, unselected row now gets --c-table-row-hover: the details pane surface in the light theme, and base-100/base-50 mixed half and half in the dark theme, where the details surface is the panel's own. Only for real hover devices. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nc1PhEEDdkm4yces1vwQzV
|
I'm thinking the hover color should take on the tint of the accent color rather than be neutral since the accent color is what you see once a row is selected. Can you adjust that? Probably maybe just via a |
A hovered row now takes a fainter tint of the selected row's accent fill instead of a neutral surface, so hover and selection read as one family: --c-color-accent-fill-quiet at 50% in the light theme and 25% in the dark theme, where that fill is more saturated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nc1PhEEDdkm4yces1vwQzV
|
Done, it's now a tint of |
[ci skip] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The hover selector overrides child-drop target feedback and omits supported row-header cells, obscuring drag intent and leaving gaps in row highlighting.
2 open issues
What changed in this PR
Adds a subtle hover fill to selectable rows in the shared control-panel DataTable, making wide element index tables easier to follow.
Changes:
- Applies cell-level hover backgrounds to unselected clickable rows on hover-capable devices.
- Adds a theme-aware token using 50% of the accent fill in light mode and 25% in dark mode.
| File | Description |
|---|---|
resources/js/common/components/DataTable.vue |
Adds the hover rule while excluding selected rows. |
packages/craftcms-ui/src/styles/shared/tokens.css |
Defines light- and dark-theme row-hover colors. |
Review effort: Balanced
Row headers (`meta.cellTag: 'th'`) have a background of their own, so painting only `td` cells left them unfilled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Rows in element index tables only change color once they're selected (
.cp-table-row.sel > td,--c-color-accent-fill-quiet). Hovering a row shows nothing, so on a wide table it's easy to lose track of which row you're on between the title and a column far to the right.This gives a hovered, unselected clickable row (
.cp-table-row--clickable) a light fill through a new--c-table-row-hovertoken, next to--c-table-border-colorintokens.css. It's a fainter tint of the accent fill a row gets once it's selected (--c-color-accent-fill-quiet), so hover and selection read as the same color at two strengths:Like the selected state, the fill goes on the cells, so it spans the content padding in the first and last cells. It only applies with a real hover (
@media (hover: hover)), so a tap on a touch screen doesn't leave a row highlighted. Selected rows keep their own fill.Light
Dark
🤖 Generated with Claude Code
https://claude.ai/code/session_01Nc1PhEEDdkm4yces1vwQzV