Skip to content

Conversation

@vursen
Copy link
Contributor

@vursen vursen commented Oct 8, 2025

Description

The avatar's colorIndex property validation was necessary when the corresponding CSS properties were shipped only as part of the Lumo and Material themes and weren't available in the base styles. Since these properties are now included in the base styles, the warning is no longer well justified. Considering that it requires a getComputedStyle() call, which can have a significant performance impact as shown below, it's better to remove it altogether.

Before After
image image

Performance measurements were taken with a 4x CPU throttle on dev/aura.html.

Type of change

  • Refactor

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

@vursen vursen marked this pull request as ready for review October 9, 2025 06:42
@vursen vursen requested review from jouni and sissbruecker October 9, 2025 06:42
@vursen vursen merged commit 61a9dd7 into main Oct 9, 2025
9 checks passed
@vursen vursen deleted the remove-color-index-warning branch October 9, 2025 10:27
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-beta2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants