CSS psuedo selectors
We should implement more pseudo selectors in Textual.
It will be really nice in combination with queries, for instance to remove the last child in a list:
self.query(".item:last-child").remove()
And of course for general styling.
I'm thinking of last-child and first-child, but we could implement any that make sense.
See https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes for a list of pseudo selectors.
I'd really recommend the :nth-child selector, and if you decide to implement it, this short video on selecting a range of elements would be a great test for whether it works according to spec:
https://youtu.be/nKLAbYQHnt8
I'm not sure if :nth-of-type makes sense or is even viable in textual, but if it is, that'd also be extremely powerful
Europython spriters: this may be a challenging one. Mention me if you need assistance.
hi there, I'm from EuroPython and I would like to take this issue.
Good luck!
Assuming this is stale. Will revisit psuedo selectors at some point in the future.