Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pseudo update #5139

Merged
merged 17 commits into from
Oct 19, 2024
Merged

Pseudo update #5139

merged 17 commits into from
Oct 19, 2024

Conversation

willmcgugan
Copy link
Collaborator

@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
Collaborator 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.

1 participant