-
Notifications
You must be signed in to change notification settings - Fork 965
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
White lines appearing next to custom mj-social-elements #1441
Comments
Hi @fac42 thanks for reporting this, The reason why it's actually a problem here is that you set a background-color on your mj-social-elements that is not the color of your images. On this component, background-color is supposed to be used to fill your icons transparent areas. Since your images have no transparency, just don't specify a background color and it renders fine. (actually with no background-color i still get a blue line on a few clients, on the left of the first icon, so give this first social-element the same background-color as the mj-section and here it's perfect on all clients) Also i'll check if the ipad bug is consistent and if your |
@kmcb777 I've implemented the colour fix you mentioned and it seems to have fixed the issue on the renders I had on EoA. However, I noticed that a default background colour is applied to mj-social-element when none is specified (the white bar below the icons then takes on that colour instead). Out of curiosity, is there a reason that the global style/CSS for image doesn't include a display: block; property? Is it because it might cause weird behaviour across all images in a template? |
Well it's weird that you see such behavior in iOS, i've seen such only on Android 🤔 Did you try to minify the file before sending? I think we already use the |
@iRyusa Also here are the global rules for img in the compiled template:
|
Yeah there's a lot of potential issue if you don't minify the output before sending |
@iRyusa |
That's the default behavior of column :) you should take a look at mj-group (note that it requires minification in order to work on ios) |
@iRyusa |
fix #1441 for ipad display block on social image
Describe the bug
White lines/bars appearing next to mj-social-element(s) when using custom icons.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Social Icons should render properly (without lines adjacent to them)
MJML environment (please complete the following information):
Email sending environment (for rendering issues):
Affected email clients (for rendering issues):
Screenshots
Rendering Issue example on iPhone 7, iPhone X (default client/Outlook)
https://i.imgur.com/mqUKn3m.png
Rendering Issue example on iPad
https://i.imgur.com/CF0eSZ9.png
Additional context
I was doing some preliminary render testing and noticed this issue, however this only occurs in certain iOS clients (according to EoA). Outlook and other mobile/desktop clients render fine. I think I've found a workaround for the iPad issue by inlining a 'display: block;' on the tag, but it doesn't solve the white line issue unfortunately. I've attempted to create an mj-class with a display:block attribute but it doesn't seem to apply to the tags within mj-social.
The text was updated successfully, but these errors were encountered: