Skip to content

Commit

Permalink
docs: up
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Apr 6, 2024
1 parent c05d1a5 commit 8faef4a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions docs/selector/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,22 @@ import ValueField from '/.vitepress/components/ValueField.vue';

下面是一些特殊情况下的简写表示

当 a=0 或 b=0 时, 括号可以省略, 比如 `A +(3n+0) B` -> `A +(3n) B` -> `A +3n B`, `A +(0n+3) B` -> `A +(+3) B` -> `A +3 B`
当 a=0 或 b=0 时, 括号可以省略, `+` 为例

当 a=0 且 b=1 时, an+b 可以省略, 比如 `A <(0n+1) B` -> `A < B`, 此外 `A + B`,`A > B` 都与等价的 CSS 语法语义相同
- `A +(3n+0) B` -> `A +(3n) B` -> `A +3n B`
- `A +(0n+3) B` -> `A +(+3) B` -> `A +3 B`

当 a=1 且 b=0 且操作符是 `>`, 可以进一步简写, 比如 `A >(1n+0) B` -> `A >n B` -> `A B`, 这与等价的 CSS 语法语义相同
当 a=0 且 b=1 时, an+b 可以省略, 以 `+` 为例

- `A +(0n+1) B` -> `A + B`

此外 `A + B`,`A > B` 都与等价的 CSS 语法语义相同

当 a=1 且 b=0 且操作符是 `>`, 可以进一步简写, 比如

- `A >(1n+0) B` -> `A >n B` -> `A B`

这与等价的 CSS 语法语义相同

## 示例 {#example}

Expand Down

0 comments on commit 8faef4a

Please sign in to comment.