Skip to content
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

Allow contextual sizes for Spacer #36

Merged
merged 5 commits into from
Jun 2, 2016
Merged

Allow contextual sizes for Spacer #36

merged 5 commits into from
Jun 2, 2016

Conversation

ethanmay
Copy link
Contributor

@ethanmay ethanmay commented May 3, 2016

This code allows you to add a size-sm and/or size-lg attribute 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.

@rafibomb
Copy link
Member

Thanks for pointing this to develop and great PR! Just added a v2.2 branch for features. If you are able to point there, it would be better to allow more testing.

Can you include a test for this so we can get it merged in for 2.2.0 coming soon?

@rafibomb rafibomb added this to the 2.2.0 milestone May 18, 2016
@ethanmay
Copy link
Contributor Author

Yes, I will get on that! Could be a couple days.

Ethan May added 2 commits May 23, 2016 23:15
Fixed appending of classes to both <spacer> elements when size-sm & size-lg attributes are present.
@ethanmay
Copy link
Contributor Author

Tests have been added, and one issue has been fixed. Please let me know if you need anything else!

@rafibomb rafibomb merged commit bd062db into foundation:develop Jun 2, 2016
@rafibomb
Copy link
Member

rafibomb commented Jun 2, 2016

Awesome PR! Tested and merged for 2.2!

@bc-ian
Copy link

bc-ian commented Aug 1, 2016

Is there documentation for this somewhere? I dont see it in http://foundation.zurb.com/emails/docs/spacer.html

@antonydjames
Copy link

antonydjames commented Aug 3, 2016

@bc-ian Looks like that page needs to be updated. I had to work this out myself...

An example implementation:

<spacer size-lg="16" size-sm="0"></spacer>

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.

@lukepeach
Copy link

@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.

jsit pushed a commit to jsit/foundation-emails that referenced this pull request Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants