docs: update component CSS variable names (#8857)

This commit is contained in:
neverland
2021-06-14 10:23:47 +08:00
committed by GitHub
parent 34a3fe8787
commit 8e3833acc8
122 changed files with 1755 additions and 1755 deletions
+19 -19
View File
@@ -175,24 +175,24 @@ Toast.resetDefaultOptions('loading');
| transition | Transition, equivalent to `name` prop of [transition](https://v3.vuejs.org/api/built-in-components.html#transition) | _string_ | `van-fade` |
| teleport | Specifies a target element where Toast will be mounted | _string \| Element_ | `body` |
### 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 |
| ------------------------------- | ------------------------- | ----------- |
| @toast-max-width | `70%` | - |
| @toast-font-size | `@font-size-md` | - |
| @toast-text-color | `@white` | - |
| @toast-loading-icon-color | `@white` | - |
| @toast-line-height | `@line-height-md` | - |
| @toast-border-radius | `@border-radius-lg` | - |
| @toast-background-color | `fade(@black, 70%)` | - |
| @toast-icon-size | `36px` | - |
| @toast-text-min-width | `96px` | - |
| @toast-text-padding | `@padding-xs @padding-sm` | - |
| @toast-default-padding | `@padding-md` | - |
| @toast-default-width | `88px` | - |
| @toast-default-min-height | `88px` | - |
| @toast-position-top-distance | `20%` | - |
| @toast-position-bottom-distance | `20%` | - |
| Name | Default Value | Description |
| --- | --- | --- |
| --van-toast-max-width | `70%` | - |
| --van-toast-font-size | `@font-size-md` | - |
| --van-toast-text-color | `@white` | - |
| --van-toast-loading-icon-color | `@white` | - |
| --van-toast-line-height | `@line-height-md` | - |
| --van-toast-border-radius | `@border-radius-lg` | - |
| --van-toast-background-color | `fade(@black, 70%)` | - |
| --van-toast-icon-size | `36px` | - |
| --van-toast-text-min-width | `96px` | - |
| --van-toast-text-padding | `@padding-xs @padding-sm` | - |
| --van-toast-default-padding | `@padding-md` | - |
| --van-toast-default-width | `88px` | - |
| --van-toast-default-min-height | `88px` | - |
| --van-toast-position-top-distance | `20%` | - |
| --van-toast-position-bottom-distance | `20%` | - |
+19 -19
View File
@@ -165,7 +165,7 @@ Toast.resetDefaultOptions('loading');
### Options
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| type | 提示类型,可选值为 `loading` `success`<br>`fail` `html` | _string_ | `text` |
| position | 位置,可选值为 `top` `bottom` | _string_ | `middle` |
| message | 文本内容,支持通过`\n`换行 | _string_ | `''` | - |
@@ -188,22 +188,22 @@ Toast.resetDefaultOptions('loading');
### 样式变量
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。
组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/config-provider)。
| 名称 | 默认值 | 描述 |
| ------------------------------- | ------------------------- | ---- |
| @toast-max-width | `70%` | - |
| @toast-font-size | `@font-size-md` | - |
| @toast-text-color | `@white` | - |
| @toast-loading-icon-color | `@white` | - |
| @toast-line-height | `@line-height-md` | - |
| @toast-border-radius | `@border-radius-lg` | - |
| @toast-background-color | `fade(@black, 70%)` | - |
| @toast-icon-size | `36px` | - |
| @toast-text-min-width | `96px` | - |
| @toast-text-padding | `@padding-xs @padding-sm` | - |
| @toast-default-padding | `@padding-md` | - |
| @toast-default-width | `88px` | - |
| @toast-default-min-height | `88px` | - |
| @toast-position-top-distance | `20%` | - |
| @toast-position-bottom-distance | `20%` | - |
| 名称 | 默认值 | 描述 |
| ------------------------------------ | ------------------------- | ---- |
| --van-toast-max-width | `70%` | - |
| --van-toast-font-size | `@font-size-md` | - |
| --van-toast-text-color | `@white` | - |
| --van-toast-loading-icon-color | `@white` | - |
| --van-toast-line-height | `@line-height-md` | - |
| --van-toast-border-radius | `@border-radius-lg` | - |
| --van-toast-background-color | `fade(@black, 70%)` | - |
| --van-toast-icon-size | `36px` | - |
| --van-toast-text-min-width | `96px` | - |
| --van-toast-text-padding | `@padding-xs @padding-sm` | - |
| --van-toast-default-padding | `@padding-md` | - |
| --van-toast-default-width | `88px` | - |
| --van-toast-default-min-height | `88px` | - |
| --van-toast-position-top-distance | `20%` | - |
| --van-toast-position-bottom-distance | `20%` | - |