Skip to content
Discussion options

You must be logged in to vote

To the best of my knowledge there isn't a supported method of doing that. At the moment you could exploit a known bug where all links with the exact same action get the same styling when one of them receives hover, you can see this in action with this code:

from random import choice
from string import ascii_uppercase

from textual.app import App, ComposeResult
from textual.widgets import Static

class HoverLettersApp(App[None]):

    CSS = """
    Static {
        link-style: none;
        link-color-hover: white;
        link-background-hover: red;
    }
    """

    def compose(self) -> ComposeResult:
        text = ""
        for _ in range(5000):
            letter = choice(ascii_uppe…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dan-zheng
Comment options

Answer selected by davep
Comment options

You must be logged in to vote
1 reply
@TomJGooding
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants