Skip to content

Remove gray border around aspect-ratio layouts in Safari and Chrome #156

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

Conversation

ooloth
Copy link
Contributor

@ooloth ooloth commented Jun 21, 2017

This pull request fixes a browser bug in Safari and Chrome that places a gray border around images in aspect-ratio layouts. The simplest solution is just to change the img tag to a div tag. This solves the issue without additional CSS. In this case, the img tag is not necessary as there is no src attribute.

To view the problem, open any of the full bleed layout component pages in Chrome or Safari.

To understand the rationale behind this solution, see this StackOverflow discussion.

Thanks to @MartinKavik for finding this solution.

@johno
Copy link
Member

johno commented Dec 27, 2017

Thanks for this fix!

@johno johno merged commit de9f923 into tachyons-css:master Dec 27, 2017
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

Successfully merging this pull request may close these issues.

2 participants