Redundant text classes - Post ID 298444

User 122279 Photo


Senior Advisor
14,465 posts

I can't even start guessing where those redundant classes have come from, if not by changes to parts of the text inside a paragraph. The file main.css does not contain any list of 'just-in-case' classes to pick and choose from. In fact, if you open a brand new project, bang in some elements (containers, text etc) without giving any of them any class name or styling, the main.css will be totally empty.
As soon as you set the width or some padding or whatever on the first container you added, it will appear in the main.css as 'container-1' with the styling you added. It will be called container-1 until/if you give it a more descriptive name.
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 2972096 Photo


Registered User
19 posts

I installed the HTML editor and went in and searched using the 'Find' button all the files in the exported folder. Nearly all the paragraph-text types that come up in the search box in Site Designer are not in the html files and not in the CSS file. So where SD is finding them is a mystery to me. Be nice to be rid of them but I guess I can live with it!
User 122279 Photo


Senior Advisor
14,465 posts

Some of us have been researching this and at least found some details and solutions. I for my part opened an SD project where I had used the inline text editor a lot to give certain words (class names) a different font. I found, when checking the main.css, a lot of entries like p.paragraph span.paragraph-text-x, just like you said initially. Nearly all of them concerned the font change. So I waded through the pages of my project, found the changed fonts, deleted the generated class name and wrote my own class name. And all the font names got the same new class name since they were all about the same kind of change.
When I had changed all I was able to find, I had 7 generated class names of the same kind left out of I think 42 before I started. I also discovered that I had not been exact enough when I first created the font changes. Sometimes I had got the space before or after the word, or a comma or a full stop included, sometimes I had missed a letter of the word I wanted to change. If I then tried to fix these things there and then, I maybe ended up with two generated classes on the same word. So I assume that those 7 leftovers may be from something like that.
Not knowing how you work nor what kind of changes you are making to text in paragraphs I can only relate my own experience and conclusions.
Another forum member that I have discussed this with, Frank Cook, has found out how you can avoid the generated class names in the future. When you select some text in order to make a change to it, before changing anything, type your own chosen class name into the 'Classes' field in the inline text editor. Then there is no reason for SD to generate any name.
Ha en riktig god dag!
Inger, Norway

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



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.