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

Image size does not respect specified units #330

Open
shmsula opened this issue Jul 10, 2023 · 1 comment
Open

Image size does not respect specified units #330

shmsula opened this issue Jul 10, 2023 · 1 comment

Comments

@shmsula
Copy link

shmsula commented Jul 10, 2023

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
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants