How can we reproduce this bug?
This has been tested using the inliner, and emailing it (using nodemailer) to an email address consumed via Outlook 2013.
<button href="#" class="primary expanded">
Expanded button
</button>
What did you expect to happen?
Button to be expanded all the way across the container.
What happened instead?
Button is only the length of the anchor (i.e. the text itself with specified padding in scss).
What email clients does this happen in?
Outlook 2013
I believe the solution is simply that the <td> under button.expanded needs width: 100% (of course not the expander). The CSS I used to fix it:
.button.expanded {
td:not(.expander) {
width: 100%;
}
}
This does apply width further inside as well, but I don't believe this to have a negative effect, however if you wanted to be extra cautionary, I believe the doing .button.expanded > tr > td is enough.
Sorry I don't submit a PR as I don't have Litmus going so I don't want to submit a PR that might impact on other clients, so it should be tested accordingly first.
I'm having this same issue in Outlook. Issue #330 (closed) suggests setting the inner
| should be 100%. Neither solution has worked for me.
table and td, sorry... The davidhouweling method appears to have solved the issue for me, though I had to use this:
That is, _button.expand_ rather than _button.expander_. Nice catch, we'd love to see a PR for this! Couple questions on this:
Hi Rafi, Thanks for contacting me. No, I am not using v2.1—some weeks ago I wrote to you asking for suggestions, saying how overwhelmed I was by all the Sass and Panini and all that stuff and that it was all over my head. That said, I am trying to get to know the CSS flavor of v2.0 and am getting encouraging results. In fact, after I posted to GitHub yesterday I arrived at the same solution as antonydjames, and my buttons are now displaying properly in Outlook. Would posting my code to the test folder actually be helpful to the other email developers, or would the benefit be negligible since my code wouldn’t be as sophisticated as all the Sass guys? And, while I have you… My supervisor has given me approval to take the Zurb University online email class. How does that work—how long does it last? Do I take it all at once, or can I do it in segments as my schedule permits? How do I pay for it? Would this be a good place for me to start down the Sass path? Thanks again [tripplite.com]http://www.tripplite.com/[Follow us on Twitter]http://twitter.com/tripplite[Find us on Facebook]http://www.facebook.com/TrippLite[See us on YouTube]http://www.youtube.com/user/tripplite From: Rafi [mailto:[email protected]] Couple questions on this:
— This message is for the addressee's use only. It may contain confidential information. If you receive this message in error, please delete it and notify the sender. Tripp Lite disclaims all warranties and liabilities, and assumes no responsibility for viruses which may infect an email sent to you from Tripp Lite and which damage your electronic systems or information. It is your responsibility to maintain virus detection systems to prevent damage to your electronic systems and information. @rafibomb Yes I am using foundation-emails version 2.1.0. The container doesn't matter. Initially I thought it might, but it doesn't. Put it on its own, put it inside a container, put it inside a column, it doesn't occupy its parent's width. With what I provided above it does. @antonydjames They use
Also experiencing this on 2.1 @RonTL Awesome that you have a working solution! Dave will contact you about the course today with more details! @davidhouweling I wonder than if we just remove the expander from the table surrounding the button is a good solution or simply overriding with CSS. This would really affect anything that is supposed to be 100% width where the .expander is not necessary. For reference, this is happening with Thoughts on the approach? In my opinion we should keep the code as clean as possible, so if removing resolves the problem, then great. They are also missing height in Outlook. The background color only covers the text, no padding or anything else. I can post some images if it helps. Is there a PR for this, or should I do it? There has a merged PR to be able to remove the expander manually using a This is where it can be removed: https://github.com/zurb/inky/blob/develop/lib/componentFactory.js#L46 @elliottregan Are you able to PR this one? @davidhouweling @elliottregan Are you to remove this as a PR? We'll be happy to merge it in! Yea, I think I can get to that this weekend. Any news on the PR, @elliottregan? Thanks :) This works In my tests, this fix seems to break Outlook 2016. The button becomes far too wide. Does anyone else experience this? It becomes far too wide because the table.button has a property width: auto
That seems to fix the button to become crazy big! @oscb Yes, but then it becomes narrow again, and not expanded. Or do you get a different result? @Stadly I could get the expanded buttons to work that way (adding my snippet and the one above).
Maybe I'm missing another change that I made. I'll take a look. @oscb When using both snippets, the buttons are still too wide in my tests. @Stadly use full button declaration (not Inky) and add width="100%" attribute to the button table. Solved the problem for me in Outlook 2010 and Outlook 2013. Now I've done some proper testing, and it turns out that it is the @eolant: The reason why width="100%" works is that Outlook converts it to Another issue is that the cursor is not a pointer when hovering the expanded button, only when hovering the text. Can anyone find a fix for this? Also, there is an issue with which parts of the button actually work like a link. It seems like the link works when clicking on the button text or to the left of the button text, while it doesn't work to the right of the button text. Kind of like this: The pull request has been merged, so unless people still are experiencing issues, this thread can probably be closed :) Experiencing this issue in 2.2. Reproducible from the included files with no modifications, after creating a foundation-cli emails project, using both the dev and production (foundation watch and foundation build) versions. Grab the HTML from the Forgot Password demo email, paste it into putsmail.com, send it to yourself, open it in Outlook 2013 - the "Reset Password" button is small and left-aligned. @skelly-jbfc A new release has not been done after the merge, so to test it, you'll need to use the code in the develop branch. Or wait for the 2.2.2 release. Any word on when 2.2.2 will be released? It's been a while since the last release... I'd be interested in knowing when a new release is coming as well. Working on the email templates today and encountered this and the margin-bottom issue. I'm working with the CSS templates and Zurb web inliner. Thx! @eolant This works for me too Thanks! Hi, While this issue does seem to be resolved do note that the wrapped link isn't the same width as the expanded button, meaning the user needs to click within the center of the button which to me presents a UX issue. I tried setting the link style to style="display: block; width: 100%" thinking it might expand out the element but no dice. My test case for this is simply the example code present for buttons at https://get.foundation/emails/docs/button.html. Additionally at time of writing, the download link present here https://get.foundation/emails/docs/css-guide.html gives the user version 2.2.0 not version 2.3.1 which has the fix for expanded button, not sure if that was intentional or not.
This is a Amazon S3 download link. Can you take a look at this @joeworkman? Was this page helpful?
0 / 5 - 0 ratings
Related issues |
Most helpful comment
I believe the solution is simply that the
<td>underbutton.expandedneedswidth: 100%(of course not the expander). The CSS I used to fix it:This does apply width further inside as well, but I don't believe this to have a negative effect, however if you wanted to be extra cautionary, I believe the doing
.button.expanded > tr > tdis enough.Sorry I don't submit a PR as I don't have Litmus going so I don't want to submit a PR that might impact on other clients, so it should be tested accordingly first.