Open
Description
It may be nice to add a syntax to queries which refers to the current widget.
For instance, if I want to get the immediate child of a widget, I could do this:
self.query("& > Child")
Currently that's rather awkward to implement.
We can also extend this to the CSS itself. i.e. ini a CSS
or DEFAULT_CSS
. For instance the following would style the widget without the need to specify its type again:
DEFAULT_CSS = """
& { border: heavy red}
"""
Currently, you have to do this:
DEFAULT_CSS = """
MyWidget { border: heavy red}
"""