Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML及CSS的缩进建议也使用2个空格 #3

Open
poplark opened this issue Apr 17, 2017 · 0 comments
Open

HTML及CSS的缩进建议也使用2个空格 #3

poplark opened this issue Apr 17, 2017 · 0 comments

Comments

@poplark
Copy link

poplark commented Apr 17, 2017

注意到JS的代码规范中缩进使用的是2个空格,建议HTML及CSS的缩进也统一使用2个空格,原因如下:

  1. HTML, CSS, JS的编辑器基本上都为同一个,统一缩进规范,配置时省时省力。
  2. HTML一行代码经常会比较长,且嵌套层级较多,4个空格的缩进会导致代码更长,编辑器滚动条也更长。若编辑器在显示时可以自动换行,不产生滚动条,则会将显示中的行数更多,导致纵向滚动条较长。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant