Border-subtitle-background¶
The border-subtitle-background
style sets the background color of the border_subtitle.
Syntax¶
border-subtitle-background: (<color> | auto) [<percentage>];
Example¶
The following examples demonstrates customization of the border color and text style rules.
from textual.app import App, ComposeResult
from textual.widgets import Label
class BorderTitleApp(App):
CSS_PATH = "border_title_colors.tcss"
def compose(self) -> ComposeResult:
yield Label("Hello, World!")
def on_mount(self) -> None:
label = self.query_one(Label)
label.border_title = "Textual Rocks"
label.border_subtitle = "Textual Rocks"
if __name__ == "__main__":
app = BorderTitleApp()
app.run()
CSS¶
Python¶
See also¶
border-title-align
to set the title's alignment.border-title-color
to set the title's color.border-title-background
to set the title's background color.-
border-title-style
to set the title's text style. -
border-subtitle-align
to set the sub-title's alignment. border-subtitle-color
to set the sub-title's color.border-subtitle-background
to set the sub-title's background color.border-subtitle-style
to set the sub-title's text style.