How to center things.
| 5 | |
| 6 | |
| 7 | class CenterApp(App): |
| 8 | """How to center things.""" |
| 9 | |
| 10 | CSS = """ |
| 11 | Screen { |
| 12 | align: center middle; |
| 13 | } |
| 14 | |
| 15 | #hello { |
| 16 | background: blue 50%; |
| 17 | border: wide white; |
| 18 | width: 40; |
| 19 | height: 9; |
| 20 | text-align: center; |
| 21 | content-align: center middle; |
| 22 | } |
| 23 | """ |
| 24 | |
| 25 | def compose(self) -> ComposeResult: |
| 26 | yield Static(QUOTE, id="hello") |
| 27 | |
| 28 | |
| 29 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected
searching dependent graphs…