Use duplicate class name on an element?

前端 未结 3 1817
[愿得一人]
[愿得一人] 2021-01-19 17:21

I found that there are many frameworks will check the duplicate class name before adding the new class name on the element that i think will slow down the performance.

3条回答
  •  后悔当初
    2021-01-19 18:06

    There is nothing "wrong" with having a duplicate class name, it's just redundant. There's probably a small performance impact, but that'll only really make much difference if you have a lot of duplication.

    Also, preventing duplicates just helps to keep things tidy.

提交回复
热议问题