Skip to content

Add centered image captions using MD/CSS hack #264

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

Merged
merged 2 commits into from
Sep 5, 2020

Conversation

ozkriff
Copy link
Member

@ozkriff ozkriff commented Sep 5, 2020

This PR uses a MD/CSS hack to add centered image captions.

before/after imgs

Before:

image

After:

image

Copy link
Collaborator

@17cupsofcoffee 17cupsofcoffee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

You could potentially add the :first-child/:last-child thing to the non-linked variant as well, but I can't really think of a scenario where you'd have an image immediately followed by an em with the way that markdown renders paragraphs. Easy to add later on if needs be.

Also might be worth adding an example of how to add captions to the example entry in newsletter-template.md (or whatever file it is you use for the initial PR each month).

@ozkriff ozkriff merged commit ef7f623 into rust-gamedev:source Sep 5, 2020
@ozkriff ozkriff deleted the image_captions branch September 5, 2020 13:38
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.

2 participants