What are the common solutions for making clean id space in a SPA?

后端 未结 7 2175
感情败类
感情败类 2021-02-14 05:05

Situation: several developers working remotely on different section/modules of a SPA. As a result they may accidentally introduce HTML elements with the same id. W

相关标签:
7条回答
  • 2021-02-14 05:33

    If your code(problem) really big, and you can't refactor it, you can try validate your css/html for find repeat id's before each commit. But it's possible answer for very bad situations.

    Good solution - using tools like bem (http://bem.info/)

    0 讨论(0)
提交回复
热议问题