Allow contextual sizes for Spacer#36
Allow contextual sizes for Spacer#36rafibomb merged 5 commits intofoundation:developfrom ethanmay:develop
Conversation
|
Thanks for pointing this to Can you include a test for this so we can get it merged in for 2.2.0 coming soon? |
|
Yes, I will get on that! Could be a couple days. |
Fixed appending of classes to both <spacer> elements when size-sm & size-lg attributes are present.
|
Tests have been added, and one issue has been fixed. Please let me know if you need anything else! |
|
Awesome PR! Tested and merged for 2.2! |
|
Is there documentation for this somewhere? I dont see it in http://foundation.zurb.com/emails/docs/spacer.html |
|
@bc-ian Looks like that page needs to be updated. I had to work this out myself... An example implementation:
This would display a spacer with a height of 16px on screen sizes with a width of >597px, but zero height for those <=596px. It's worth bearing in mind that this uses media queries so likely won't work for email clients/browsers that don't support those. I haven't had chance to test it but assume that in such cases the 'size-lg' value will always be used. |
|
@rafibomb can you guys please update the foundation inky page for spacers to reflect the size-lg and size-sm attributes? I was looking for this for weeks and finally stumbled upon this pull request. |
This code allows you to add a
size-smand/orsize-lgattribute to a<spacer>tag to have different sized spaces on small/large screens. The result is two<spacer>s rendered in HTML, with the show/hide-for-large classes applied to each.