Consider supporting resolution: Ndppx
media query instead of -webkit-device-pixel-ratio: N
#1008
Labels
feature request
New feature or request
For
apple-touch-startup-image
links, pwa-asset-generator produces media queries that target specific device pixel ratios using the non-standard-webkit-device-pixel-ratio: ${scaleFactor}
media feature, e.g.This has worked perfectly well for many years (and continues to work exactly as intended), across all versions of Safari.
Since version 16, Safari added support for the
resolution: ${scaleFactor}dppx
media feature from the Media Queries Level 4 spec (and it's close relativesmin-resolution
andmax-resolution
). These provide an equivalent, but standards-compliant alternative to the non-standard, vendor prefixed-webkit-device-pixel-ratio
.https://developer.mozilla.org/en-US/docs/Web/CSS/@media/resolution
It may be worth considering supporting this new way of targeting specific pixel densities, even if initially via an opt-in CLI argument (for example:
--prefer-resolution
). This would allow PWA developers targeting Safari 16+ to prefer the standards-compliant version over the non-standard version.(Note that I am making an assumption here that for the purpose of
apple-touch-startup-image
, Safari considers-webkit-device-pixel-ratio: 2
andresolution: 2dppx
to be analogous)The text was updated successfully, but these errors were encountered: