8000 Modify the table hover attribute · Issue #5061 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Modify the table hover attribute #5061

@santaimpersonator

Description

@santaimpersonator

Context

Modify the background color of a table row when a mouse hovers over a table's row.

Description

When using the default dark color palette, the background color change when hovering over a table's row is almost indistinguishable.

background_color
From the MkDocs-Material documentation

Related links

Use Cases

A white or black color won't work with both colr schemes. However, a nuetral color like yellow or green seems to be fine, with a higher alpha value.

Obviously, a new color variable could be created and called to match each of the light and dark color schemes. However, this seemed like a simple solution to the problem. Plus, the information for this modification could be documented as a stylesheet override in the data table section for users who'd want to customize it.

Visuals

Yellow Modification:

.md-typeset table:not([class]) tbody tr:hover {
    background-color: rgba(255,255,0,.08);
}

background_green

Green Modification:

.md-typeset table:not([class]) tbody tr:hover {
    background-color: rgba(0,255,0,.08);
}

background_yellow

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0