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

Bug: Fixing figure and image tag spacing to be equivalent #200

Merged
merged 1 commit into from Dec 5, 2017

Conversation

shredtechular
Copy link
Contributor

This PR fixes #199.

As pointed out in #199 there was more top/bottom margin spacing on <figure> tags as opposed to <image> tags. In order to make the spacing (margins) equivalent, this required a few minor CSS rules to be applied to <figure> and <figcaption> tags. The rules in this PR make the spacing for the tags exactly the same now.

As you can see in the screen caps below, the margins are now the same for above/below <image> tags as well as <figure> tags:

Before bugfix

As you can see the current site has 44px computed margins above and below figure tags.

screen shot 2017-12-04 at 9 29 24 pm

And on <image> tags, currently the margins are based on the parent <p> tag and has a computed margin of 25.74px above and below.

screen shot 2017-12-04 at 9 42 54 pm

After bugfix

With the code contained in this bugfix, you can see the computed margins for <figure> tags are now 0 on top and 25.74px on the bottom. So, the bottom margins are now exactly the same.

screen shot 2017-12-04 at 9 28 36 pm

Finally, you can see that above the figures are going to be a <p> tag which has a computed bottom margin of 25.74px already, so now the top margins match exactly just like the current <image> tags.

screen shot 2017-12-04 at 9 28 41 pm

@mtlynch
Copy link
Owner

mtlynch commented Dec 5, 2017

Awesome, thanks!

@mtlynch mtlynch merged commit 9e349d0 into mtlynch:master Dec 5, 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.

Reduce spacing on <figure> posts
2 participants