You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if it's worth adding a note/warning/something to the documentation, when dealing with type selectors, to the effect that something like this won't work:
fromtextual.appimportApp, ComposeResultfromtextual.widgetsimportLabelasMyLabelclassAliasTest( App[ None ] ):
CSS=""" MyLabel { text-style: bold; color: yellow; background: red; } """defcompose( self ) ->ComposeResult:
yieldMyLabel( "This is a very important heading" )
if__name__=="__main__":
AliasTest().run()
Textual's CSS isn't going to see the alias of Label being MyLabel. I could see this being a little gotcha that might trip someone up.
The text was updated successfully, but these errors were encountered:
I wonder if it's worth adding a note/warning/something to the documentation, when dealing with type selectors, to the effect that something like this won't work:
Textual's CSS isn't going to see the alias of
Label
beingMyLabel
. I could see this being a little gotcha that might trip someone up.The text was updated successfully, but these errors were encountered: