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

Small floated images are wider than they should be #5213

Closed
jasmussen opened this issue Feb 23, 2018 · 1 comment
Closed

Small floated images are wider than they should be #5213

jasmussen opened this issue Feb 23, 2018 · 1 comment
Labels
[Type] Bug An existing feature does not function as intended

Comments

@jasmussen
Copy link
Contributor

Issue Overview

Floated, unresized images, are given a max-width of 360px, and a width of 100%.

If the image is smaller than 360px, the figure included will result in a bunch of whitespace to the right of it.

This does not affect resized images, only unresized images.

Steps to Reproduce (for bugs)

  1. Upload an image smaller than 360px. For example this one:

screen shot 2018-02-23 at 10 38 11

  1. Float it left, add some text afterwards.

Notice how the float takes up more space than it needs to:

screen shot 2018-02-23 at 10 39 09

#5209 may be related.

@jasmussen jasmussen added the [Type] Bug An existing feature does not function as intended label Feb 23, 2018
jasmussen pushed a commit that referenced this issue Apr 4, 2018
This fixes #3945 and #5213. It is a new PR that is meant to replace #5209. This PR is a work in progress.
jasmussen added a commit that referenced this issue Apr 13, 2018
* Fix various image width problems

This fixes #3945 and #5213. It is a new PR that is meant to replace #5209. This PR is a work in progress.

* Remove inline style for unscaled images.

Also fix placeholder.

* Restore float widths for blocks without intrinsice width

Affects CoverImage, Gallery, Embed. This moves those styles to each blocks individual stylesheet.

* Remove inline style on figure for scaled images

With the presence of `fit-content` applied to the figure, the explicit inline style is no longer required.
@jasmussen
Copy link
Contributor Author

Closing as fixed per the recent commits:

screen shot 2018-04-17 at 10 33 50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant