Streaming live at 10am (PST)

Create new class from current element, which inherits all CSS properties from all classes applied to that element

Hey all,

Many times, I have created a class, needed to tweak a particular element that has that class selector, and so created a combo class, et cetera, and later found that I’d rather have a new class with all those properties, OR that I’d rather the original class take on all the added properties of the combo class.

Is there a way to create a new class from an existing element, which would inherit all the styling of that existing element? Right now, the only way I can accomplish this is by selecting the element with the combo class applied, scroll through the style panel and write down all the attributes on paper, and repeat that process for each selector for that element, then manually create a new class with all that styling applied.

Thanks for your time!
Cheers,
Josh


My site’s particular link not relevant to the question, given that the question is about Webflow mechanics, rather than implementation on my particular site.

Hey @joshuataylormusic

  1. You could add the styles to the primary element.
  2. Insert a new element - don’t give it a class name.
  3. Then delete the primary element from the Designer. It will still be in list so you can reuse.
  4. On that new element start typing the class name and it should take hold.

That’s the only way because any other element with that class name will stay in Styles database. You would need to delete any other element that’s using that class. But… hmm I think that’s it… I’ll stay tuned, maybe someone else has a solution :slight_smile: