CodeGuide icon indicating copy to clipboard operation
CodeGuide copied to clipboard

Alloyteam代码规范

Results 16 CodeGuide issues
Sort by recently updated
recently updated
newest added

1. 我看上面 [declaration-order](http://alloyteam.github.io/CodeGuide/#css-declaration-order) 并没有 flex 布局相关的属性,应该是太久没更新了; 2. 都 2021 年了,估计很少人手写兼容各大平台的 CSS 属性了,都用 autoprefixer 去处理了,所以里面的 -webkit-、-ms- 这些前缀相关的属性是不是可以去掉了。 使用 CSScomb 一键排序的时候发现以上问题

1. !important使用规则 “!important”只能主动使用,不能被动使用。 我们主动命名一些公共样式时,为了保证不被意外内容覆盖,可以使用"!important", 如: ``` css .hidden { display: none !important; } ``` 而不是被动等问题发生后,用来取巧, 如: ``` html ... ``` ``` css .content h2 { font-size: 2em; } .heading-sub {...

>变量命名 标准变量采用驼峰式命名(除了对象的属性外,主要是考虑到cgi返回的数据) 'ID'在变量名中全大写 'URL'在变量名中全大写 'Android'在变量名中大写第一个字母 'iOS'在变量名中小写第一个,大写后两个字母 常量全大写,用下划线连接 构造函数,大写第一个字母 jquery对象必须以'$'开头命名 在[团队规范文档](http://alloyteam.github.io/CodeGuide/#js-variable-naming)中提到的`标准变量采用驼峰式命名(除了对象的属性外,主要是考虑到cgi返回的数据)`,想知道什么是`cgi`? 既然对象的属性不以驼峰的形式命名,那么是以什么方式命名?

```javascript // need blank line after blocks var obj = { foo: function() { return 1; }, bar: function() { return 2; } }; // not need blank line when...

[http://alloyteam.github.io/CodeGuide/#js-jshint](http://alloyteam.github.io/CodeGuide/#js-jshint) 这个下边 ``` // not good var singleton = new function() { var privateVar; this.publicMethod = function() { privateVar = 1; }; this.publicMethod2 = function() { privateVar = 2; };...

请问,规范页index是怎么打包成一个完整项目的,多谢!

> 属性应该按照特定的顺序出现以保证易读性; > > class > id > name > data-* > src, for, type, href, value , max-length, max, min, pattern > placeholder, title, alt > aria-*, role >...

你们这个代码的规范是markdown自动生成的,还是手写的样式文件。