Skip to content
Discussion options

You must be logged in to vote

This is what we'd expect to happen. You're matching on a type and types in Python are case-sensitive. StopWatch and Stopwatch are two different Python classes.

Consider this example:

from textual.app        import App, ComposeResult
from textual.containers import Vertical
from textual.widgets    import Header, Footer, Label

class ThisIsATest( Label ):
    pass

class ThisisaTest( Label ):
    pass

class Thisisatest( Label ):
    pass

class CSSCaseExampleApp( App[ None ] ):

    CSS = """
    ThisIsATest {
        border: round red;
    }

    ThisisaTest {
        border: round green;
    }

    Thisisatest {
        border: round blue;
    }
    """

    def compose( self ) -> Compose…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by davep
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2297 on April 16, 2023 14:23.