Skip to content

width style from <img> overrides the style on resized <figure> #17441

@Mgsy

Description

@Mgsy

📝 Provide detailed reproduction steps (if any)

  1. Go to https://ckeditor.com/docs/ckeditor5/latest/examples/builds-custom/full-featured-editor.html.
  2. Open source editing
  3. Use the following source:
<figure style="clear: both;margin: 0.9em auto;min-width: 50px;text-align: center;box-sizing: border-box;display: block;max-width: 100%;width: 5.15%;"class="image image_resized">
 <img height="233" width="258" src="https://www.shutterstock.com/image-vector/sample-red-square-grunge-stamp-260nw-338250266.jpg" style="display: block;height: auto;margin: 0px auto;max-width: 100%;min-width: 100%;width: 100%;aspect-ratio: 258/233;" />
</figure>
  1. View the source again.

✔️ Expected result

<figure> preserves the width: 5.15% style.

❌ Actual result

<figure> inherits width: 100% from <img>.


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

Metadata

Metadata

Assignees

Labels

package:imagesupport:2An issue reported by a commercially licensed client.type:bugThis issue reports a buggy (incorrect) behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions