NO BUG: Applying a ccs class to an element AFTER editing

BROWSER: Version 125.0.6422.142 (Offizieller Build) (arm64)
OS: MacOS Ventura 13.3

The only way to use a css class on different elements, is when the css class is generated BEFORE the element is edited in any way.

Editing an element, then giving it a class and applying this class then to different elements doesnt work.

Doesnt that destroy the whole purpose of classes? Shouldnt i be able to save a style after i edited an element and then apply it to different elements.

That should clearly be implemented.

Hi,
If you “edit” an element/add styles to it, these are assigned to the element’s ID. If you apply a class to this element where the same CSS properties are used, the ID styles always take precedence as they have a higher specificity.

You can reset the ID styles or copy them to a separate class and then reset them. However, depending on the loading order, this may also lead to unexpected results, which is also to be expected, as the two classes have the same specificity and, therefore, the order is decisive.

That’s how CSS works…