amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

CSS mask: fails using Safari on ampproject cdn cache due to missing CORS headers

Open meistudioli opened this issue 8 years ago • 5 comments

To whom it may concern:

Please access the following links with browser safari (desktop || mobile version).

There will be several image CORS errors occur. screenshot

That's all because safari ask CSS mask image need to add CORS for security issue. That's why ampproject cdn cache file can't render CSS mask and that will make page layout looks strange.

Paul

meistudioli avatar Jul 17 '18 06:07 meistudioli

Could be cache bug, could be a Safari bug. css mask: on safari requires CORS headers. I'm guessing Safai is treating masks the same way browsers treat fonts, whereas Chrome sees masks as images.

This is the offending line in the example page

.mask-orb{
  mask:url('https://s-yimg-com.cdn.ampproject.org/i/s/s.yimg.com/ma/auc/item/icon/mask-orb.svg#mask');
  -webkit-mask:url('https://s-yimg-com.cdn.ampproject.org/i/s/s.yimg.com/ma/auc/item/icon/mask-orb.svg');
}

jpettitt avatar Jul 18 '18 19:07 jpettitt

Unassigning for amp cache to look at.

Gregable avatar Jul 18 '18 19:07 Gregable

Tracked internally as 80296288.

jgluk avatar Jul 19 '18 21:07 jgluk

Closing bug as this is an AMP Cache specific. That project is tracking internally.

Gregable avatar Aug 30 '18 01:08 Gregable

The fix for this issue was rolled out and I verified the issue is resolved. Please let me know if there is still any issue.

csLittleye avatar Nov 13 '18 21:11 csLittleye