Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVGs not rendering properly within Mac OS Big Sur and iOS 14 #116

Closed
timknight opened this issue Dec 1, 2020 · 3 comments
Closed

SVGs not rendering properly within Mac OS Big Sur and iOS 14 #116

timknight opened this issue Dec 1, 2020 · 3 comments

Comments

@timknight
Copy link

Given two SVGs

image

<!-- add.svg -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path fill-rule="evenodd" clip-rule="evenodd" d="M12 22.9091C5.97545 22.9091 1.09091 18.0251 1.09091 12C1.09091 5.97545 5.97545 1.09091 12 1.09091C18.0251 1.09091 22.9091 5.97545 22.9091 12C22.9091 18.0251 18.0251 22.9091 12 22.9091ZM12 0C5.37273 0 0 5.37273 0 12C0 18.6273 5.37273 24 12 24C18.6273 24 24 18.6273 24 12C24 5.37273 18.6273 0 12 0ZM18 11.4545H12.5455V6.00109C12.5455 5.69836 12.3016 5.45455 12 5.45455C11.6984 5.45455 11.4545 5.69836 11.4545 6.00109V11.4545H6C5.69836 11.4545 5.45455 11.6989 5.45455 12C5.45455 12.3016 5.69836 12.5465 6 12.5465H11.4545V18C11.4545 18.3016 11.6984 18.5455 12 18.5455C12.3016 18.5455 12.5455 18.3016 12.5455 18V12.5465H18C18.3016 12.5465 18.5455 12.3016 18.5455 12C18.5455 11.6989 18.3016 11.4545 18 11.4545Z" fill="#30353F"/>
</svg>

<!-- add-fill.svg -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.37273 0 0 5.37273 0 12C0 18.6273 5.37273 24 12 24C18.6273 24 24 18.6273 24 12C24 5.37273 18.6273 0 12 0ZM18 11.4545H12.5455V6.00109C12.5455 5.69836 12.3016 5.45455 12 5.45455C11.6984 5.45455 11.4545 5.69836 11.4545 6.00109V11.4545H6C5.69836 11.4545 5.45455 11.6989 5.45455 12C5.45455 12.3016 5.69836 12.5465 6 12.5465H11.4545V18C11.4545 18.3016 11.6984 18.5455 12 18.5455C12.3016 18.5455 12.5455 18.3016 12.5455 18V12.5465H18C18.3016 12.5465 18.5455 12.3016 18.5455 12C18.5455 11.6989 18.3016 11.4545 18 11.4545Z" fill="#30353F"/>
</svg>

When converted both are seen properly on Mac OS Catalina, however within the new release of Mac OS Big Sur the filled one (along with several other examples in my icon set) render as completely filled. Here's an example of it right from the online testing library.

image

Now, to be clear compiling the icon set on Mac OS Big Sur works fine when viewed in Catalina, it seems that however the font is being generated Big Sur is having issues with how to display it properly. It's basically as if you'd removed the fill-rule on the path. I've dug through previous issues and am not seeing anything similar even though others have had different rendering issues. Does anyone have any ideas?

@timknight timknight changed the title SVGs not rendering properly within Mac Big Sur SVGs not rendering properly within Mac OS Big Sur Dec 1, 2020
@timknight
Copy link
Author

I'd like to add that this isn't just in Big Sur, it's also icons displaying on iOS 14 from what I can tell.

@timknight timknight changed the title SVGs not rendering properly within Mac OS Big Sur SVGs not rendering properly within Mac OS Big Sur and iOS 14 Dec 1, 2020
@timknight
Copy link
Author

timknight commented Dec 1, 2020

Similar issue to #62

After further research this issue certainly seems to be related to the SVG fill rules. It seems for vector objects that worked fine previously are more sensitive to these issues when viewed in Big Sur and iOS 14. For those designing SVGs in Figma (like myself) you can use the Fill Rule Editor plugin to adjust the fill rule and direction.

@umanghome
Copy link

Here's how to use the Fill Rule Editor plugin: https://youtu.be/j6dZw3K_E3M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants