Skip to content

Table row hover doesn't work with themes #541

Closed
@jorgecasar

Description

@jorgecasar

I would like to suggest a change in normalize.src.css to follow surface pattern.

Using theme switcher you have to override this part to make it work.

:where(table tr:hover td),
:where(tbody tr:nth-child(even):hover td) {
  background-color: var(--gray-10);

  @media (prefers-color-scheme: light) {
    background-color: white;
  }
}

It should be use --surface-* variables, like other parts of the file table or td. I would like to suggest use --surface-3 because td currently is --surface-1 and th are --surface-2, then td on hover state will be different from other rows and header.

:where(table tr:hover td),
:where(tbody tr:nth-child(even):hover td) {
  background-color: var(--surface-3);
}

Here is an example for testing normalize with theme switcher. With the table fix applied. What do you thing @argyleink?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions