Skip to content

Conversation

@willmcgugan
Copy link
Member

@willmcgugan willmcgugan commented Oct 18, 2024

Improves the mechanism to expose pseudo classes.

Previously a widget would return all its pseudo classes, even if Textual just needed to know if a single one was present. This made it expensive, and there was a reluctance to add more pseudo classes. This new mechanism can check for the presence of pseudo classes without generating all of them. It's faster, and we can add new ones without slowing down.

  • Added first-of-type, last-of-type, odd, and even pseudo classes.
  • Optimizations to caching stylesheet.apply

@willmcgugan
Copy link
Member Author

#executivedecision

@darrenburns Feel free to do a retroactive review for this one.

@willmcgugan willmcgugan merged commit 3daf4d7 into main Oct 19, 2024
20 checks passed
@willmcgugan willmcgugan deleted the pseudo-update branch October 19, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants