GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
648 stars 229 forks source link

Image size does not respect specified units #330

Open shmsula opened 1 year ago

shmsula commented 1 year ago

Description: When changing the image size units to percent, the image and the table cell do not adjust accordingly and remain in pixels.

Steps to reproduce:

Open https://grapesjs.com/demo-mjml.html Select the image with car sciolino-paris-bw.jpg Change the units to percent, and the value to 50 Observe that the td size will be set to 50px and the image to 50 without any units, instead of 50% of the parent element.

pepoteloko commented 1 year ago

Reading the MJML documentation I understand that it only supports pixels. If this is correct, the problem is the dropdown, which should only allow pixels.

https://documentation.mjml.io/#mj-image

Is there an easy way to be able to hide the other units in the selector?