You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/rules/indentation/README.md
+32-32
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# indentation
2
2
3
-
Specify indentation.
3
+
指定缩进。
4
4
5
5
```css
6
6
|@mediaprint {
@@ -10,20 +10,20 @@ Specify indentation.
10
10
| ↑}↑ ↑
11
11
|}↑ ↑ ↑
12
12
/** ↑ ↑ ↑
13
-
* The indentation at these three points*/
13
+
* 这三点的缩进*/
14
14
```
15
15
16
-
The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.
Always indent at-rules, rules, comments, declarations, inside parentheses and multi-line values by 2 spaces.
24
+
始终将 @规则、规则、注释、声明、括号内和多行值按 2 个空格缩进。
25
25
26
-
The following patterns are considered violations:
26
+
以下模式被视为违规:
27
27
28
28
```css
29
29
@mediaprint {
@@ -87,7 +87,7 @@ a {
87
87
}
88
88
```
89
89
90
-
The following patterns are *not* considered violations:
90
+
以下模式*不*被视为违规:
91
91
92
92
```css
93
93
@mediaprint {
@@ -133,13 +133,13 @@ a {
133
133
}
134
134
```
135
135
136
-
## Optional secondary options
136
+
## 可选的辅助选项
137
137
138
138
### `baseIndentLevel: int|"auto"`
139
139
140
-
By default, the indent level of the CSS code block in non-CSS-like files is determined by the shortest indent of non-emptyline. The setting `baseIndentLevel` allows you to define a relative indent level based on CSS code block opening or closing line.
By default, *one extra* indentation (of your specified type) is expected after newlines inside parentheses, and the closing parenthesis is expected to have no extra indentation.
If you would like to change the quantity of extra indentation inside parentheses, use this option.
161
+
如果要更改括号内的额外缩进数量,请使用此选项。
162
162
163
-
`"twice"` means you expect two extra indentations (of your specified type) after newlines inside parentheses, and expect the closing parenthesis to have one extra indentation. For example:
`"once-at-root-twice-in-block"` means two things: You want the behavior of `"once"`, as documented above, when the parenthetical expression is part of a node that is an immediate descendent of the root — i.e. not inside a block. And you want the behavior of `"twice"`, as documented above, when the parenthetical expression is part of a node that is inside a block. For example, with aSCSS map:
The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.
0 commit comments