Change the name of a class - Post ID...

User 2845679 Photo


Registered User
10 posts

Goodday everyone,

It is an old topic of more than 3 and a half years old but is it already possible in CCSD4?

https://www.coffeecup.com/forums/respon … f-a-class/

When I want to make a component out of one of the "Themes", there are often class names that make no sense in a new project. If you could change the name of that class to a more fitting name, that would be nice.

Thanks in advance if anyone can help me,
Robert
iMac 27-inch, 2019
macOS Mojave 10.14.4
Site Designer 4.0 - 3113. Newcomer/beginner.


User 122279 Photo


Senior Advisor
14,447 posts

Yes, you can do that. What you have to be careful about is, when you have deleted a class name, you MUST write the new name in immediately, without clicking anywhere else. If you do, you lose the properties you want to keep.

It also works best if the element in question has just one class name. If there are more than one, take a look in the css part on the element pane to see which properties are tied in with which classes. Make a note of such classes that have very little to them, like something about the width, or the margins/padding. Write down those properties, so that you can add them back after having changed the name of the most important class.
AND maybe make a backup copy before you start! Better safe than sorry! ;)

I'll remove the posts about this in the other thread...
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 379556 Photo


Registered User
1,533 posts

Inger wrote:
It also works best if the element in question has just one class name. If there are more than one ...

If there are more classes than one, another way I have used is as follows.

I duplicate the element, and in the duplicate
(a) I remove the other classes;
(b) I change the name of the relevant class as in Inger's first paragraph.
Then
(1) in the original element I delete the relevant class and add the new class created in (b);
(2) I delete the duplicate element.

One must, of course, not try to change the name of a class which is from the framework's list of classes shown in the Insert section of the Class Selector in the Styles panel.

Frank
User 2845679 Photo


Registered User
10 posts

Thank you Inger and thank you Frank. And thanks, Inger, for removing my posts. I have tried the one-class method and that is going well. But if an element has multiple classes, I have to read your description carefully. I'm going to try to understand and practice that at a quiet moment. Thank you both for your time to help me.

Robert
iMac 27-inch, 2019
macOS Mojave 10.14.4
Site Designer 4.0 - 3113. Newcomer/beginner.


User 2914916 Photo


Registered User
3 posts

How did you remove and add classes to your elements?
I can't' even seem to view them let alone add or change them.
I'm stumped!
Thanks
Paul
User 2695940 Photo


Registered User
148 posts

Hi Paul,
You can find the classes in the Styles pane, the paint brush on top, and then under Type Class. You can type a new class name and then adjust its properties in the section below.

Hope that helps,
John
Attachments:
John Ferguson
Website Design and Development
www.jf1.co
User 2695940 Photo


Registered User
148 posts

I didn't mean to point at the Reset Properties box, look farther down on the menu Paul for more settings.
John Ferguson
Website Design and Development
www.jf1.co

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.