Community forum for knowledge and support

Updated 11 months ago

Best Practices for Copying and Pasting Components

At a glance

The community member is seeking insights or tips for the best way to work when copy-pasting multiple of the same components. They are experiencing issues with the children of the pasted components being named with an '8' and the class sync feature not syncing global styles. Another community member suggests that to stop duplicate classes from happening, the project needs to be rid of any duplicate classes. Once the project is clean, the issue of duplicate classes should be resolved.

Hello πŸ™‚
Does someone has insights or tips for best way of working when copy>pasting multiple of the same components?

  • For example: I paste section_layout8 > the children are are now all named something with an '8'. Is it best to always remove the generic class names and create a new class with a better suiting name? If I want to paste the same or similar component on a different page > it feels like such a hassle to mix and match classes, try and figure out how to get the same style, without accidentally overriding settings etc.

  • Btw I have class sync on but for some reason it does not sync global padding, container-large etc. It keeps creating new classes.

Looking forward to hear your way of working!

M
P
2 comments

would you mind sharing a read-only link?

In order to stop duplicated classes from happening, you have to rid your project of any duplicate classes. Once your project is clean and you try to paste components and you are still getting duplicate classes - let me know!

Hi Matt, I am unable to share a link with you, but I think your tip will solve the issue! Will try it out πŸ™‚ Thank you so much for responding.

Add a reply
Sign up and join the conversation on Slack