Skip to content

Textual's restyle loop gets overloaded when a * selector and :hover selector target the same style block #6602

Description

@NSPC911

The bug

When having an unassuming stylesheet like this

#root > *,
Button:hover {
    border: solid red
}

moving your mouse around can make each restyle take much much longer.

2026-06-26_23-41-53.mp4

Script used: https://github.com/NSPC911/textual-trials/blob/master/lagging-mouse.py

This effect worsens with more style definitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions