Replace classes on paste?

Hello,
I am moving content from an old project to a new project, and upon pasting it, Webflow will automatically create copies of the classes (for example, since Class already existed, it created Class 2). Now I have a lot of content that is not following the rules of the new design, which I had already set. How can I tell it to replace “Class 2” with “Class” for all the objects that use it

Manually removing “Class 2” and putting “Class” back into everything is driving me insane and wasting so much time. Also how could I copy the properties of Class to Class 2 to make this faster?

1 Like

No way (This is not modular). First the name “class” is bad / not semantic (If you don’t want rename issues - change the name before you paste) - if you use the new design elements and remove the old one - over time when you go to “remove unused classes” webflow remove a lot of styles.

image

The copy-paste won’t change your old design. Change “class” styles if you want (Only one time for all project).

In general, over projects if you use global styles for body, P, H1-H6, use swatches its more modular (For example set the font for the body - instead of changing the font for each element).

Put two divs one with “class” and the other with “class 2” on the same page - and manually match/compare the classes (Less than 1 minute for each breakpoint).

Hello Siton_Systems,
Thank you for your reply.

The issue I am presenting is one of experience design, in which Webflow does not ask how to treat pasting objects with the same classes applied to them in different projects. If it had asked me whether I wanted to replace the existing classes, keep the ones I already had or maybe merge them somehow, then it would be really great for the user.

One of the classes in my project is called “ImgTall” and it has created “ImgTall2”. Now, even if I try to rename “ImgTall2” to “ImgTall”, Webflow will still not ask me if I want to overwrite/replace the class, it simply says I can’t have two classes with the same name, which to me is causing a lot of trouble, because I have many objects with the same classes on this project.

Also, as a little bit of advice, you shouldn’t say some task “will take less than one minute for each breakpoint” if you don’t know the complexity of a project of how well the user is versed in a tool, context or task.

Webflow is the only tool with copy paste. Copy and replace is mega feature with no way to know what you change in your project (very buggy for big projects = nightmare)

I understand the complexity of the task, and that is why I am suggesting that Webflow does not make a choice for me (like duplicating all my copied styles), but instead asks the user what to do. Webflow doesn’t need to be responsible for the outcome of every action, as long as the options are well explained to all levels of users.

1 Like

Add wishlist about this topic. In my opnion copy and replace is to risky - but maybe it will be usefull for some users

Wishlist idea created - Ask user how to proceed when pasting elements from | Webflow Wishlist

Nah, copy and replace would be absolutely insane. I just don’t want certain stuff to be applied to certain classes, since im not only using Webflow, but also custome code. If i got an array of classes and want to switch certain ones with query selectors, i can only do that either with the import of some janky UI library or by explicitly naming every existing combo class on its own. Cant count how many times within a project iv’e wished there would be a copy-replace feature, i mean if you just plain code css your also able to just copy the div style propertys and paste it inside another class.