docs: update component CSS variable names (#8857)
This commit is contained in:
+13
-13
@@ -121,20 +121,20 @@ export default {
|
||||
| change | Emitted when check status changed | _value: any_ |
|
||||
| click | Emitted when component is clicked | _event: MouseEvent_ |
|
||||
|
||||
### Less Variables
|
||||
### CSS Variables
|
||||
|
||||
How to use: [Custom Theme](#/en-US/theme).
|
||||
The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/config-provider).
|
||||
|
||||
| Name | Default Value | Description |
|
||||
| --- | --- | --- |
|
||||
| @switch-size | `30px` | - |
|
||||
| @switch-width | `2em` | - |
|
||||
| @switch-height | `1em` | - |
|
||||
| @switch-node-size | `1em` | - |
|
||||
| @switch-node-background-color | `@white` | - |
|
||||
| @switch-node-box-shadow | `0 3px 1px 0 rgba(0, 0, 0, 0.05)` | - |
|
||||
| @switch-background-color | `@white` | - |
|
||||
| @switch-on-background-color | `@blue` | - |
|
||||
| @switch-transition-duration | `@animation-duration-base` | - |
|
||||
| @switch-disabled-opacity | `@disabled-opacity` | - |
|
||||
| @switch-border | `@border-width-base solid rgba(0, 0, 0, 0.1)` | - |
|
||||
| --van-switch-size | `30px` | - |
|
||||
| --van-switch-width | `2em` | - |
|
||||
| --van-switch-height | `1em` | - |
|
||||
| --van-switch-node-size | `1em` | - |
|
||||
| --van-switch-node-background-color | `@white` | - |
|
||||
| --van-switch-node-box-shadow | `0 3px 1px 0 rgba(0, 0, 0, 0.05)` | - |
|
||||
| --van-switch-background-color | `@white` | - |
|
||||
| --van-switch-on-background-color | `@blue` | - |
|
||||
| --van-switch-transition-duration | `@animation-duration-base` | - |
|
||||
| --van-switch-disabled-opacity | `@disabled-opacity` | - |
|
||||
| --van-switch-border | `@border-width-base solid rgba(0, 0, 0, 0.1)` | - |
|
||||
|
||||
+12
-12
@@ -135,18 +135,18 @@ export default {
|
||||
|
||||
### 样式变量
|
||||
|
||||
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。
|
||||
组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/config-provider)。
|
||||
|
||||
| 名称 | 默认值 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| @switch-size | `30px` | - |
|
||||
| @switch-width | `2em` | - |
|
||||
| @switch-height | `1em` | - |
|
||||
| @switch-node-size | `1em` | - |
|
||||
| @switch-node-background-color | `@white` | - |
|
||||
| @switch-node-box-shadow | `0 3px 1px 0 rgba(0, 0, 0, 0.05)` | - |
|
||||
| @switch-background-color | `@white` | - |
|
||||
| @switch-on-background-color | `@blue` | - |
|
||||
| @switch-transition-duration | `@animation-duration-base` | - |
|
||||
| @switch-disabled-opacity | `@disabled-opacity` | - |
|
||||
| @switch-border | `@border-width-base solid rgba(0, 0, 0, 0.1)` | - |
|
||||
| --van-switch-size | `30px` | - |
|
||||
| --van-switch-width | `2em` | - |
|
||||
| --van-switch-height | `1em` | - |
|
||||
| --van-switch-node-size | `1em` | - |
|
||||
| --van-switch-node-background-color | `@white` | - |
|
||||
| --van-switch-node-box-shadow | `0 3px 1px 0 rgba(0, 0, 0, 0.05)` | - |
|
||||
| --van-switch-background-color | `@white` | - |
|
||||
| --van-switch-on-background-color | `@blue` | - |
|
||||
| --van-switch-transition-duration | `@animation-duration-base` | - |
|
||||
| --van-switch-disabled-opacity | `@disabled-opacity` | - |
|
||||
| --van-switch-border | `@border-width-base solid rgba(0, 0, 0, 0.1)` | - |
|
||||
|
||||
Reference in New Issue
Block a user