fix(image): Support the image to be centered when using a different H… #1618
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR supports the image component to be centered horizontally which doesn't use HTML
img
tag. For example, using anchor tag as image link or a DIV container wasn't able to be centered in the page despite usingcentered image
class name.The group images were supposed to be center when using
centered
class name, but it never really were. It only set auto for left and right margin but with no width declaration which doesn't make the images to stay center. So, auto margin for left and right of the group images doesn't make sense and was removed in this PR. Instead, it's rendering as flex box and the images inside are now centered as it supposed to be.The group images can also share the same vertical alignment or can have independent alignment for it's own now.
Testcase
Before: https://jsfiddle.net/v759o1rb/1/
After: https://jsfiddle.net/5tpk3evz/1/
Closes
#1608