Renaming a CSS style will also rename the stylename uses at the element

By Evert van der Zalm on 11 May 2010


I think it's very handy that when the stylename is changed in the CSS the elements who are using that style also get the new stylename.

Now I need to search on the old stylename to see witch elements are using the old style and replace it with the new style name.
J.11 May 2010

I wouldn't want that, because I don't want every elementt changes along with the renaming. so the feature now is ok as it is. manually check to change elements if they are to be changed.



This is pure about a style witch is used everywhere and I want to give a proper name to it.

To give a example:

A developer made a style for a button, called: large_button. I would name this style: button_large (hope you can agree on that one :) ). But when I rename the style I need to change all the styles on all my buttons (wtih are a lot!).

Same is when a style is used to display text in a color, let's say: text_grey. Now the cusomer want that text to be blue. I can change this simply in that css style, but the name of the style stays: text_grey. Not the name I expect for blue text.

As you can imagine I don't want to change 100 button styles or 50 text styles just to have a proper name.
Rodrigo Coutinho11 Jun 2010
You can actually use the Find & Replace styles feature, available since 5.0, to do this.

Just copy your "large_button" style into a new "button_large" style, and then follow the procedure described in this video.

Best of luck!
Paulo Tavares15 Jul 2010
Already Done.

Done?

So in which version then?
Paulo Tavares16 Jul 2010
Hi Evert.

This idea had been already tagged as "Done" with Rodrigo's comment. Apparently, it's been done in version 5.0, as he explained it

You can actually use the Find & Replace styles feature, available since 5.0, to do this.

Just copy your "large_button" style into a new "button_large" style, and then follow the procedure described in this video.

I've just added a comment to all ideas that had already been released before 5.1, because we are going to take out the "Released" tag, since they already existed before you suggested them, but were misleading when tagged as "Done".

Does this solve your request, or is it not done yet?

Let us know.

Regards,
Paulo Tavares

Hi Paulo,

The comment is a solution how you could solve it.

I made this topic because I would like the idea that I don't have to use search and replace to do this. I want to change the name of the style in CSS and this name should also be renamed at all the widgets that are using that style.

Just like every other topic that's created at the WotC I want this one and posted it to see if 'other' developers share this comment. It is nice someone made a turnaround but that is not the solution so I also think this topic can't get the DONE! because the original idea isn't done!
Paulo Tavares16 Jul 2010
Hi Evert.

Thanks for clearing it up - that's why I asked.

EDIT: No longer in "done" status.

Regards,
Paulo Tavares

Paulo,

Thanks.

Kind Regards,
Evert