Styles from loaded project data are overridden by component default styles #4514
-
I have a custom component with following default styles applied:
When I drag&drop this component into the canvas, the margin-top is shown in the Styles Manager and the class When I now reload the page, the project data (containing both css definitions) will be loaded successfully but the component does only have the default style (margin-top) applied instead of margin-top AND background-color. Is this intended behavior? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, it's intended behavior as you're updating the class rule itself. |
Beta Was this translation helpful? Give feedback.
Yes, it's intended behavior as you're updating the class rule itself.
Probably you need to enable component-first selectors for your use case
https://grapesjs.com/docs/modules/Selectors.html#component-first-selectors