-
Notifications
You must be signed in to change notification settings - Fork 88
refactor: switch from part attribute to class selectors in grid #10488
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
Conversation
d08ec8b to
b8c7aa8
Compare
7927f77 to
7feb1a2
Compare
|
| <tbody id="emptystatebody"> | ||
| <tr id="emptystaterow"> | ||
| <td part="empty-state" id="emptystatecell" tabindex="0"> | ||
| <td part="empty-state" class="empty-state" id="emptystatecell" tabindex="0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add a class because switching Lumo to use #emptystatecell would affect the selector specificity...
|
This ticket/PR has been released with Vaadin 25.0.0-beta6. |



Description
The PR replaces attribute selectors such as
[part~='header']with class selectors like.headerin the grid component's CSS stylesheets. This change noticebly improves performance in large complex grids by reducing style recalculation cost.Base styles (selector stats)
Before ~1.7M
After ~660K
Base styles
~35% improvement in render time:
Aura
~32% improvement in render time:
Lumo
~17% improvement in render time:
(All measurements are taken on a page with 60-column heavy grid)
Type of change