Safari 17 doesn't show svg icons in dark mode

After migrating from iOS 16 to 17, Safari does not show svg icons. On devices with iOS 16 they are displayed

  • Is it on your website? Do you have the source code available? Please add more details.

Add a Comment

Replies

Is a react WebApp. Svg was define as

import React from "react";

export default function ArrowLeft() { return ( <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-testid="arrow-left"> <path d="M4.50001 11.625H19.5V12.375H4.50001V11.625Z" /> <path d="M10.6465 5.14645L11.3536 5.85355L5.20712 12L11.3536 18.1464L10.6465 18.8536L3.79291 12L10.6465 5.14645Z" /> </svg> ); }

Example of Icon

It can reproduce in light mode too. If it is the first time for a browser tab to render the SVG,the SVG DOM will disappear but the layer remains,such like give the dom the style visibility: hidden.