-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: Allow multiple simultaneous CSS themes.
- Loading branch information
Showing
11 changed files
with
707 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#btn { | ||
background: green; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#btn { | ||
border: tall white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"""Basic themed application for unit tests.""" | ||
|
||
from textual.app import ComposeResult | ||
|
||
from textology import apps | ||
from textology import widgets | ||
|
||
|
||
class BasicThemedApp(apps.ExtendedApp): | ||
"""Simple themed application with basic elements for testing interactions and snapshots.""" | ||
|
||
CSS_THEMES = { | ||
"green": [ | ||
"basic_themed_app-green_btn.css", | ||
], | ||
"white": [ | ||
"basic_themed_app-white_border.css", | ||
], | ||
} | ||
|
||
def compose(self) -> ComposeResult: | ||
"""Provide basic layout.""" | ||
yield widgets.Button("Click me!", id="btn") | ||
|
||
|
||
app = BasicThemedApp() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.