mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Cell): add css vars to customize font size of the cell value (#12260)
This commit is contained in:
parent
874a5fc600
commit
e67d8aa0cf
@ -220,11 +220,13 @@ The component provides the following CSS variables, which can be used to customi
|
||||
| --van-cell-label-line-height | _var(--van-line-height-sm)_ | - |
|
||||
| --van-cell-label-margin-top | _var(--van-padding-base)_ | - |
|
||||
| --van-cell-value-color | _var(--van-text-color-2)_ | - |
|
||||
| --van-cell-value-font-size | _inherit_ | - |
|
||||
| --van-cell-icon-size | _16px_ | - |
|
||||
| --van-cell-right-icon-color | _var(--van-gray-6)_ | - |
|
||||
| --van-cell-large-vertical-padding | _var(--van-padding-sm)_ | - |
|
||||
| --van-cell-large-title-font-size | _var(--van-font-size-lg)_ | - |
|
||||
| --van-cell-large-label-font-size | _var(--van-font-size-md)_ | - |
|
||||
| --van-cell-large-value-font-size | _inherit_ | - |
|
||||
| --van-cell-group-background | _var(--van-background-2)_ | - |
|
||||
| --van-cell-group-title-color | _var(--van-text-color-2)_ | - |
|
||||
| --van-cell-group-title-padding | _var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs)_ | - |
|
||||
|
@ -225,11 +225,13 @@ import type {
|
||||
| --van-cell-label-line-height | _var(--van-line-height-sm)_ | - |
|
||||
| --van-cell-label-margin-top | _var(--van-padding-base)_ | - |
|
||||
| --van-cell-value-color | _var(--van-text-color-2)_ | - |
|
||||
| --van-cell-value-font-size | _inherit_ | - |
|
||||
| --van-cell-icon-size | _16px_ | - |
|
||||
| --van-cell-right-icon-color | _var(--van-gray-6)_ | - |
|
||||
| --van-cell-large-vertical-padding | _var(--van-padding-sm)_ | - |
|
||||
| --van-cell-large-title-font-size | _var(--van-font-size-lg)_ | - |
|
||||
| --van-cell-large-label-font-size | _var(--van-font-size-md)_ | - |
|
||||
| --van-cell-large-value-font-size | _inherit_ | - |
|
||||
| --van-cell-group-background | _var(--van-background-2)_ | - |
|
||||
| --van-cell-group-title-color | _var(--van-text-color-2)_ | - |
|
||||
| --van-cell-group-title-padding | _var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs)_ | - |
|
||||
|
@ -15,11 +15,13 @@
|
||||
--van-cell-label-line-height: var(--van-line-height-sm);
|
||||
--van-cell-label-margin-top: var(--van-padding-base);
|
||||
--van-cell-value-color: var(--van-text-color-2);
|
||||
--van-cell-value-font-size: inherit;
|
||||
--van-cell-icon-size: 16px;
|
||||
--van-cell-right-icon-color: var(--van-gray-6);
|
||||
--van-cell-large-vertical-padding: var(--van-padding-sm);
|
||||
--van-cell-large-title-font-size: var(--van-font-size-lg);
|
||||
--van-cell-large-label-font-size: var(--van-font-size-md);
|
||||
--van-cell-large-value-font-size: inherit;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
@ -59,6 +61,7 @@
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: var(--van-cell-value-color);
|
||||
font-size: var(--van-cell-value-font-size);
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
word-wrap: break-word;
|
||||
@ -115,5 +118,9 @@
|
||||
.van-cell__label {
|
||||
font-size: var(--van-cell-large-label-font-size);
|
||||
}
|
||||
|
||||
.van-cell__value {
|
||||
font-size: var(--van-cell-large-value-font-size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user