Currently, when you copy/paste or duplicate an element that as a CSS ID assigned, this CSS ID is removed from the copy/duplicate. While this is helpful in certain situations (to avoid duplicate IDs), there are other situations where this is not intended and leads to unexpected results.
Suggestion for improvement: Add a warning and let the user choose, if the ID should be removed or not.
Hmm that go would against semantics. To my knowledge, ID‘s must be unique elements. (That’s their purpose).
If you have a special case where an ID is present double (could you name me one?) you could just override the css ID name to the same name.
Doing something that shouldn’t be done as a basic so every copy/paste action would get a warning message wouldn’t be my preference
Use Case 1: I copy an element and paste it into a different page.
Use Case 2: I duplicate an element within the same page, but add mutually exclusive conditions to these two elements (so only one of them is active at a time).
Ok, but does that mean you are styling them via custom css at the ID level?
Because wouldn’t a class be the appropiate way then?
Unless you need it for different reasons that styling ofcourse.
Keep in mind that IDs are not only used for styling, they also serve as target for in-page links.
I rename all my linktargets in advanced > custom css > id - so never use the default targets.
CSS is ‘root’ so works by default and I have the possibility to override the ID name in the class selector. So I understand your wish but I guess I’m not a supporter.
That said that’s my opinion ofcourse. Others may think differently about this. You can always add it to the ideaboard to have people vote for it