Merge pull request #727 from Textualize/default-css

Default css
This commit is contained in:
Will McGugan
2022-09-02 14:01:56 +01:00
committed by GitHub
34 changed files with 70 additions and 54 deletions

View File

@@ -11,7 +11,7 @@ class Thing(Static):
class AddRemoveApp(App):
CSS = """
DEFAULT_CSS = """
#buttons {
dock: top;
height: auto;

View File

@@ -3,7 +3,7 @@ from textual.widgets import Static
class CenterApp(App):
CSS = """
DEFAULT_CSS = """
CenterApp Screen {
layout: center;

View File

@@ -4,7 +4,7 @@ from textual.widgets import Static
class CenterApp(App):
CSS = """
DEFAULT_CSS = """
#sidebar {
dock: left;

View File

@@ -10,7 +10,7 @@ from textual.widget import Widget
class Box(Widget, can_focus=True):
CSS = "#box {background: blue;}"
DEFAULT_CSS = "#box {background: blue;}"
def render(self) -> RenderableType:
return Panel("Box")

View File

@@ -21,7 +21,7 @@ class NewScreen(Screen):
class ScreenApp(App):
CSS = """
DEFAULT_CSS = """
ScreenApp Screen {
background: #111144;
color: white;

View File

@@ -5,7 +5,7 @@ from textual.widgets import DirectoryTree
class TreeApp(App):
CSS = """
DEFAULT_CSS = """
Screen {
overflow: auto;