Font-awesome: Zooming on Safari does not scale svg icons

Created on 4 May 2018  ยท  12Comments  ยท  Source: FortAwesome/Font-Awesome

Describe the problem

Go to any examples of the svg icons and zoom in and out in Safari (https://fontawesome.com/how-to-use/svg-with-js for instance) -- the icons do not scale.

What did you expect?

SVG icons to scale with browser zoom.

What version and implementation are you using?

Version:
Browser and version: Safari 11.1, macOS High Sierra

  • [x] SVG with JS
  • [ ] Web Fonts with CSS
  • [ ] SVG Sprites
  • [ ] On the Desktop

Reproducible test case

https://fontawesome.com/how-to-use/svg-with-js

ss

bug css svg

All 12 comments

Hi!

Thanks for being part of the Font Awesome Community.

image

Cannot replicate on iOS 11.3.1. Could you please provide all the information required by our bug report template, including OS?

Please make sure that your request follows our bug report template

Meanwhile, closing here

Updated the OP.

No issues with pinch-to-zoom:
image

There seems to be issue with CMD++

I need to investigate on this

@SeriousLemon thanks for reporting this, I can confirm

I have a reduced test case without font awesome, I don't know if this could be considered a browser bug: https://jsfiddle.net/tagliala/f1Ljqk5b/3/

The problem is in the font-size: inherit property of .svg-inline--fa which is preventing Safari from scaling up icons.

@robmadole what is the purpose of that css rule on an <svg> element?

It's to ensure that we inherit the computed font-size from the parent. This sounds like a Safari bug to me.

We're running into this same problem. Has anyone filed a bug report with Apple that we can dupe?

@winzig I have a reduced test case without Font Awesome: https://jsfiddle.net/tagliala/f1Ljqk5b/3/

I've filed a bug report with Apple (rdar://43425312). You can view the open radar version of it here: https://openradar.appspot.com/radar?id=5024734567727104

It would help them prioritize this issue if everyone here that has an Apple dev account could dupe the bug report. Using Brisk makes it very easy. There's a menu option to "Duplicate Radar":

screen shot 2018-08-17 at 8 49 42 am

Then you just enter "43425312", it pre-fills my report, and you can either just submit it or add your own comments. (Yes, unbelievably this is how they prefer to prioritize bug reports!)

To install Brisk from Terminal:

brew cask install Brisk

You'll then find it in your Applications folder.

If you don't have brew installed, refer to the brew page.

Oh and thanks to @tagliala: I referenced your test case in the report.

Still not fixed in Safari 14...

Sad that it's still an issue. Quite a while ago one of the Safari devs recommended I report the bug via webkit.org so I did at that time, here it is: https://bugs.webkit.org/show_bug.cgi?id=199236

I reported it via the Feedback Assistant yesterday and for similar reports it says โ€œMore than 10โ€. It might be useful if people who have Apple Developer account report it via the Feedback Assistant too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seppestas picture seppestas  ยท  3Comments

petermolnar picture petermolnar  ยท  3Comments

faithdong picture faithdong  ยท  3Comments

ufoczek picture ufoczek  ยท  3Comments

daneren2005 picture daneren2005  ยท  3Comments