int
Html:
1: Nested nodes should be indented by four spaces
2: Use double quotes for attributes eg: class=""
3: Single label (`
Css:
1: Indent: 4 spaces
2: Space: space 1, space 2 (space must be included between `:` and `attribute value`)
.selector {
padding: 0px;
}
3: id naming: camel case naming, it is forbidden to use id as a style control class naming: underscore
4: All class naming, except public styles, all must start with the current module name or abbreviated name, ".modelName" + "-" + className.
eg: .login-label .login-input
5: Each selector declaration must be on its own line
eg: .post,
.page,
.comment {
line -height: 1.5;
}
6: The nesting level of the selector should not be greater than `3 levels`
7: The attribute must end with a semicolon after being defined. 8 , bottom, left)
/ display / visibility / overflow / z-index (cascading order)
Self properties: width / height / background / border / outline, etc.
Text properties: font / color / text- align / text-decoration / vertical-align / line-height
/text-indent / white-space / list-style (list style) /content, etc.
Other attributes: cursor / zoom, etc.
9: Paths in the `url()` function are not quoted.
10: Named color values are not allowed for color values. The color value case items must be consistent
11: background; both horizontal and vertical positions must be given.
12: Font: Song SimSun Hei SimHei Microsoft YaHei Microsoft YaHei
13: `line-height` should use numerical values when defining text paragraphs. When `line-height` is used to control vertical centering, it should still be set to the same height as the container.
eg: .container {
line-height: 1.5;
}
14: The `hack` attribute is immediately followed by the corresponding attribute