How to change the margin from px to rem
Question
Hi @artf,
Hope you are doing fine.
I have changed the margin settings from "px" to "rem" in one of the element using below code:
{
property : 'margin-top',
name: 'Top Margin',
units : ['rem'],
type: 'integer',
}
but when i re-assign the same margin setting to element after save then its multiplies the margin with 16x px i.e means the "rem" is converted into "px" and element gets disapper.
Please let us know how we can change the "px" settings to "rem" settings in all the elements of the grapesJs.
Hope for the positive response. Thanks Artf.
Answers (2)
Please @Deepak813... follow the template of the issue, provide a demo and steps to reproduce
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1245
How to set slider in margin-top property
Hi @artf, Can you please let me know how we can set the slider in margin-top property.I am setting with the below code but slider is moving...
Issue #1258
Style is not copying after cloning the element after Save
Hi @artf. At the first time before saving the template, When I make one element and clone it, the style is coming in the clonned element. T...
Issue #1520
[Bug] On this.components() Error : Uncaught TypeError: Cannot read property 'each' of undefined
Get below error for this.components() not sure if it is bug or I am doing something wrong. Uncaught TypeError: Cannot read property 'each'...
Issue #1497
Inner element content change with pop-up
Hello @artf I've make pop-up for select custom link data with image. Now all the data reflected properly but when I try to change src than...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.