mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'css' of github.com:Textualize/textual into render-style
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
App.-show-focus *:focus {
|
||||
tint: #8bc34a 50%;
|
||||
}
|
||||
|
||||
#uber1 {
|
||||
layout: vertical;
|
||||
background: green;
|
||||
@@ -6,8 +10,12 @@
|
||||
text-style: underline;
|
||||
}
|
||||
|
||||
#uber1:focus-within {
|
||||
background: darkslateblue;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
height: 8;
|
||||
height: 10;
|
||||
color: #12a0;
|
||||
background: #ffffff00;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,9 @@ class BasicApp(App):
|
||||
|
||||
async def on_mount(self):
|
||||
"""Build layout here."""
|
||||
first_child = Placeholder(id="child1", classes="list-item")
|
||||
uber1 = Widget(
|
||||
Placeholder(id="child1", classes="list-item"),
|
||||
first_child,
|
||||
Placeholder(id="child2", classes="list-item"),
|
||||
Placeholder(id="child3", classes="list-item"),
|
||||
Placeholder(classes="list-item"),
|
||||
@@ -32,6 +33,8 @@ class BasicApp(App):
|
||||
)
|
||||
self.mount(uber1=uber1)
|
||||
uber1.focus()
|
||||
self.first_child = first_child
|
||||
self.uber = uber1
|
||||
|
||||
async def on_key(self, event: events.Key) -> None:
|
||||
await self.dispatch_key(event)
|
||||
@@ -50,8 +53,7 @@ class BasicApp(App):
|
||||
"Focused widget is:",
|
||||
self.focused,
|
||||
)
|
||||
print(1234, 5678)
|
||||
sys.stdout.write("abcdef")
|
||||
self.app.set_focus(None)
|
||||
|
||||
def action_modify_focussed(self):
|
||||
"""Increment height of focussed child, randomise border and bg color"""
|
||||
|
||||
Reference in New Issue
Block a user