Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

SVG icon is stretched in notifications #867

Open
anselmbradford opened this issue Oct 25, 2018 · 6 comments
Open

SVG icon is stretched in notifications #867

anselmbradford opened this issue Oct 25, 2018 · 6 comments

Comments

@anselmbradford
Copy link
Member

Visit https://cfpb.github.io/capital-framework/components/cf-notifications/ and look at the error notification and see that the icon is stretched slightly tall.

screen shot 2018-10-25 at 10 02 50 am

@jimmynotjim
Copy link
Contributor

Looks square again.

screen shot 2018-11-05 at 5 55 17 pm

@anselmbradford
Copy link
Member Author

It appears to depend on the browser window size. It's correct at smaller sizes, but not desktop. Also 👋 Jimmy:

screen shot 2018-11-06 at 9 15 27 am

screen shot 2018-11-06 at 9 15 42 am

@jimmynotjim
Copy link
Contributor

👋

Double check what you're inspecting in those screenshots, one is the svg and one is the path within the svg. The svg itself is expected to be taller than it is wide, because the canvas matches the canvas of Avenir and the icon is set within that canvas to align it to the text.

Unfortunately I'm now seeing in my screen shot the icon is actually breaking outside the overlay box but your small screen screenshot doesn't look like it's doing that. Very weird.

@anselmbradford
Copy link
Member Author

Double check what you're inspecting in those screenshots, one is the svg and one is the path within the svg. The svg itself is expected to be taller than it is wide, because the canvas matches the canvas of Avenir and the icon is set within that canvas to align it to the text.

Ah good catch, yup path reports a square, but visually it's stretched:

screen shot 2018-11-08 at 9 23 07 am

@Scotchester
Copy link
Contributor

This seems to be different between browsers, too. In FF, it doesn't look stretched, but the left and right edges of the circle are slightly cut off.

In Chrome, it seems to be a rounding issue. I see the stretching as screenshotted above, but if I increase the font-size rule that controls the size of the icon, the problem goes away.

@anselmbradford
Copy link
Member Author

Tab icons are stretched here too https://www.consumerfinance.gov/owning-a-home/closing-disclosure/

Screen Shot 2020-01-09 at 5 00 26 PM

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

No branches or pull requests

3 participants