Skip to content

Conversation

tomivirkki
Copy link
Member

@tomivirkki tomivirkki commented Aug 31, 2023

Description

The <vaadin-icon> component uses a sizing-related fallback mechanism for font icons on browsers that don't support Container Query units for pseudo-elements.

The fallback is currently only needed on the following supported browsers:

  • Safari 15: Doesn't support Container Queries at all
  • Safari 16+: Has a critical bug related to Container Queries

The need for the fallback is currently determined by testing support for Container Queries or simply checking if the Browser is Safari.

Since the Webkit bug has already been fixed and the fix will assumably start landing with Safari 16+ versions in the near future, it's better to detect whether Container Queries work correctly on the (Safari) browser instead of always using the fallback regardless of the Safari version.

@tomivirkki tomivirkki force-pushed the chore/icon/font-icon-fallback-check branch from 180eca3 to a393b30 Compare August 31, 2023 13:12
@tomivirkki tomivirkki force-pushed the chore/icon/font-icon-fallback-check branch from 4061d2d to ec74d2c Compare September 1, 2023 06:47
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@DiegoCardoso DiegoCardoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

If we ever need to use this helper in another component, we may introduce some optimization, like storing the result after the first time the function is called. But since this is being called once, there's no need for that.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.2.0.alpha10 and is also targeting the upcoming stable 24.2.0 version.

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.

3 participants