This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
Display of right-aligned images is inconsistent between the front and back end #696
Labels
Milestone
Description
Twenty Nineteen is designed to have right-aligned elements extend outside of the text column like so:
For image blocks, this occurs in the editor as intended. But on the front end, the image is tucked all the way into the text column instead:
Details
This happens because our standard
alignright
block styles target direct children of.entry-content
. For most blocks (Cover, Pullquote, Galleries,etc.), that works just fine. They apply thealignright
class to their topmost container like so:By contrast, Left- and right-aligned images are wrapped in a container
div
that does not include the alignment class:This prevents the image from picking up our alignment styles.
Possible Solutions
alignright
classname to the wrapperdiv
. This would also make this behavior more consistent with the way that classname appears for other blocks. (There's some background in there regarding why that may not be a good idea though)cc @jasmussen for some thoughts, since you know a lot of the background on this one. 🙂
Note: that this issue a little similar to #688, which occurs because non-captioned images are wrapped in a
p
tag when inserted via the Classic Editor.The text was updated successfully, but these errors were encountered: