-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
1173 caption max width #1843
base: trunk
Are you sure you want to change the base?
1173 caption max width #1843
Conversation
With the post content I've put at the end of this comment, I'm seeing alignment weirdness with wide-aligned images on the two-column and full-width templates: Full-width, the image is wider than the viewport: Two-column, the caption is not constrained: Also, if the caption is shorter than the page width, the background collapses: <!-- wp:paragraph -->
<p>Normal:</p>
<!-- /wp:paragraph -->
<!-- wp:image {"id":324,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://largo.test/wp-content/uploads/2018/11/24496652921_1108fff3b7_h-771x514.jpg" alt="Alt Text Two fencers go at it." class="wp-image-324"/><figcaption>Caption: Two fencers go at it.</figcaption></figure>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>Curabitur congue cursus risus, sit amet laoreet sem scelerisque at. Mauris luctus, eros ut suscipit accumsan, velit eros ultricies risus, a pulvinar nisi enim ac quam. In iaculis pellentesque nisi vel congue. Sed rhoncus dignissim efficitur. Vivamus ornare nec felis sit amet dapibus. Maecenas bibendum nunc facilisis dui luctus tempor. In hac habitasse platea dictumst. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec iaculis, neque sed consequat dictum, diam ligula ornare justo, non dictum sapien turpis iaculis nibh. Sed molestie mattis diam a dictum. Aliquam sit amet enim at lacus vulputate sodales. Mauris vulputate ligula eu sollicitudin interdum. Quisque pellentesque, nisi eu feugiat bibendum, nulla libero condimentum ligula, et mollis orci dui ut metus. Suspendisse consequat metus mauris, ac congue elit placerat ac. </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Aligned left:</p>
<!-- /wp:paragraph -->
<!-- wp:image {"align":"left","id":324,"width":386,"height":257,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="alignleft size-large is-resized"><img src="https://largo.test/wp-content/uploads/2018/11/24496652921_1108fff3b7_h-771x514.jpg" alt="Alt Text Two fencers go at it." class="wp-image-324" width="386" height="257"/><figcaption>Caption: Two fencers go at it.</figcaption></figure></div>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>Curabitur congue cursus risus, sit amet laoreet sem scelerisque at. Mauris luctus, eros ut suscipit accumsan, velit eros ultricies risus, a pulvinar nisi enim ac quam. In iaculis pellentesque nisi vel congue. Sed rhoncus dignissim efficitur. Vivamus ornare nec felis sit amet dapibus. Maecenas bibendum nunc facilisis dui luctus tempor. In hac habitasse platea dictumst. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec iaculis, neque sed consequat dictum, diam ligula ornare justo, non dictum sapien turpis iaculis nibh. Sed molestie mattis diam a dictum. Aliquam sit amet enim at lacus vulputate sodales. Mauris vulputate ligula eu sollicitudin interdum. Quisque pellentesque, nisi eu feugiat bibendum, nulla libero condimentum ligula, et mollis orci dui ut metus. Suspendisse consequat metus mauris, ac congue elit placerat ac. </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Aligned right:</p>
<!-- /wp:paragraph -->
<!-- wp:image {"align":"right","id":324,"width":386,"height":257,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="alignright size-large is-resized"><img src="https://largo.test/wp-content/uploads/2018/11/24496652921_1108fff3b7_h-771x514.jpg" alt="Alt Text Two fencers go at it." class="wp-image-324" width="386" height="257"/><figcaption>Caption: Two fencers go at it.</figcaption></figure></div>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>Curabitur congue cursus risus, sit amet laoreet sem scelerisque at. Mauris luctus, eros ut suscipit accumsan, velit eros ultricies risus, a pulvinar nisi enim ac quam. In iaculis pellentesque nisi vel congue. Sed rhoncus dignissim efficitur. Vivamus ornare nec felis sit amet dapibus. Maecenas bibendum nunc facilisis dui luctus tempor. In hac habitasse platea dictumst. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec iaculis, neque sed consequat dictum, diam ligula ornare justo, non dictum sapien turpis iaculis nibh. Sed molestie mattis diam a dictum. Aliquam sit amet enim at lacus vulputate sodales. Mauris vulputate ligula eu sollicitudin interdum. Quisque pellentesque, nisi eu feugiat bibendum, nulla libero condimentum ligula, et mollis orci dui ut metus. Suspendisse consequat metus mauris, ac congue elit placerat ac. </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Aligned wide:</p>
<!-- /wp:paragraph -->
<!-- wp:image {"align":"wide","id":324,"sizeSlug":"large"} -->
<figure class="wp-block-image alignwide size-large"><img src="https://largo.test/wp-content/uploads/2018/11/24496652921_1108fff3b7_h-771x514.jpg" alt="Alt Text Two fencers go at it." class="wp-image-324"/><figcaption>Caption: Two fencers go at it.</figcaption></figure>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>Curabitur congue cursus risus, sit amet laoreet sem scelerisque at. Mauris luctus, eros ut suscipit accumsan, velit eros ultricies risus, a pulvinar nisi enim ac quam. In iaculis pellentesque nisi vel congue. Sed rhoncus dignissim efficitur. Vivamus ornare nec felis sit amet dapibus. Maecenas bibendum nunc facilisis dui luctus tempor. In hac habitasse platea dictumst. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec iaculis, neque sed consequat dictum, diam ligula ornare justo, non dictum sapien turpis iaculis nibh. Sed molestie mattis diam a dictum. Aliquam sit amet enim at lacus vulputate sodales. Mauris vulputate ligula eu sollicitudin interdum. Quisque pellentesque, nisi eu feugiat bibendum, nulla libero condimentum ligula, et mollis orci dui ut metus. Suspendisse consequat metus mauris, ac congue elit placerat ac. </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Aligned full:</p>
<!-- /wp:paragraph -->
<!-- wp:image {"align":"full","id":324,"sizeSlug":"large"} -->
<figure class="wp-block-image alignfull size-large"><img src="https://largo.test/wp-content/uploads/2018/11/24496652921_1108fff3b7_h-771x514.jpg" alt="Alt Text Two fencers go at it." class="wp-image-324"/><figcaption>Caption: Two fencers go at it.</figcaption></figure>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>Curabitur congue cursus risus, sit amet laoreet sem scelerisque at. Mauris luctus, eros ut suscipit accumsan, velit eros ultricies risus, a pulvinar nisi enim ac quam. In iaculis pellentesque nisi vel congue. Sed rhoncus dignissim efficitur. Vivamus ornare nec felis sit amet dapibus. Maecenas bibendum nunc facilisis dui luctus tempor. In hac habitasse platea dictumst. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec iaculis, neque sed consequat dictum, diam ligula ornare justo, non dictum sapien turpis iaculis nibh. Sed molestie mattis diam a dictum. Aliquam sit amet enim at lacus vulputate sodales. Mauris vulputate ligula eu sollicitudin interdum. Quisque pellentesque, nisi eu feugiat bibendum, nulla libero condimentum ligula, et mollis orci dui ut metus. Suspendisse consequat metus mauris, ac congue elit placerat ac. </p>
<!-- /wp:paragraph --> |
@benlk I have a hunch that's coming from some leftover styles adding left/right margins to |
I haven't checked, but there may be |
For when we come back to this, 96fc6a4 should have all of the updates needed for the issues mentioned above, except for the |
Changes
This pull request makes the following changes:
figcaption
onalignwide
andalignfull
images have the same width as the main-column text.Why
Fixes #1173
Testing/Questions
Features that this PR affects:
Questions that need to be answered before merging:
Steps to test this PR: