Incosistent Issue where styles are not being applied by ID and instead applied to whole class #4266
-
Hello everyone, So I have been working on building a editor with grapesjs and it has been going fantastic so far but I have come across a issue wherein on editing any component grapesjs is not applying styles by the id of the component and instead applying the style to the class of the component (which was loaded externally). Some examples: Here you can see changing the color of the text component applied the style on the id associated Now we attempt to change the style of this button for example: Now note that the changed style is being applied to the .main-btn class instead of using id I pass the changing values of the colors by calling the upValue function on the selected component https://grapesjs.com/docs/api/property.html#property Does anyone have any explanation on what could be the reason behind this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, |
Beta Was this translation helpful? Give feedback.
Hello,
Really sorry for the bothering I have been able to fix this issue this approach https://grapesjs.com/docs/modules/Selectors.html#component-first-selectors