Performance impact on classes without styling?

Does it affect performance to have classes that are not used to style elements?

eg:.

<div class="translatable">...</div>

where it is .translatableused to search for all elements that will have a dynamic change in their contents in certain situations.

+3
source share
2 answers

These classes increase the loading time of the document (more text = more time) and have very little effect on the time required to interpret any class reference (I assume that the class names are in hash tables, and an additional name may cause such a hash - the table will be highlighted a little more).

, , CSS, . .

+6

Source: https://habr.com/ru/post/1727218/


All Articles