Skip to content

Commit

Permalink
Merge pull request #9616 from ckeditor/i/9300-small-image-in-cell
Browse files Browse the repository at this point in the history
Fix (image): The block image smaller than 50px should be resized to the minimum size. Closes #9300.
  • Loading branch information
oleq authored May 5, 2021
2 parents 8c33c10 + 2cec513 commit 7667757
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ <h2>Sizes expressed as percentages</h2>
<img src="sample300.jpg" class="image-style-align-right image_resized" style="width:25%;">
</td>
<td>
&nbsp;
block<br>original<br>(very small resized to the min size)
<figure class="image"><img src="sample20.png"></figure>
</td>
<td>
&nbsp;
inline<br>original<br>(very small)
<img src="sample20.png">
</td>
</tr>
</tbody>
Expand Down
Binary file added packages/ckeditor5-image/tests/manual/sample20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/ckeditor5-image/theme/image.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */
max-width: 100%;

/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */
min-width: 100%
}
}

Expand Down

0 comments on commit 7667757

Please sign in to comment.