From e8580c08859914cf961c22e76670815a17b641de Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 31 Oct 2021 19:51:30 +0800 Subject: [PATCH] feat(Coupon): add --van-coupon-content-text-color css var (#9760) * feat(Coupon): add --van-coupon-content-text-color css var * chore: upd --- packages/vant/src/coupon-list/README.md | 1 + packages/vant/src/coupon-list/README.zh-CN.md | 1 + packages/vant/src/coupon/index.less | 3 ++- packages/vant/src/coupon/var.less | 1 + packages/vant/src/style/var.less | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/vant/src/coupon-list/README.md b/packages/vant/src/coupon-list/README.md index 658d56edc..092fd4685 100644 --- a/packages/vant/src/coupon-list/README.md +++ b/packages/vant/src/coupon-list/README.md @@ -168,6 +168,7 @@ The component provides the following CSS variables, which can be used to customi | --van-coupon-margin | _0 var(--van-padding-sm) var(--van-padding-sm)_ | - | | --van-coupon-content-height | _84px_ | - | | --van-coupon-content-padding | _14px 0_ | - | +| --van-coupon-content-text-color | _var(--van-text-color)_ | - | | --van-coupon-background-color | _var(--van-background-color-light)_ | - | | --van-coupon-active-background-color | _var(--van-active-color)_ | - | | --van-coupon-border-radius | _var(--van-border-radius-lg)_ | - | diff --git a/packages/vant/src/coupon-list/README.zh-CN.md b/packages/vant/src/coupon-list/README.zh-CN.md index c9b871241..ce256eeb9 100644 --- a/packages/vant/src/coupon-list/README.zh-CN.md +++ b/packages/vant/src/coupon-list/README.zh-CN.md @@ -170,6 +170,7 @@ import type { CouponCellProps, CouponListProps } from 'vant'; | --van-coupon-margin | _0 var(--van-padding-sm) var(--van-padding-sm)_ | - | | --van-coupon-content-height | _84px_ | - | | --van-coupon-content-padding | _14px 0_ | - | +| --van-coupon-content-text-color | _var(--van-text-color)_ | - | | --van-coupon-background-color | _var(--van-background-color-light)_ | - | | --van-coupon-active-background-color | _var(--van-active-color)_ | - | | --van-coupon-border-radius | _var(--van-border-radius-lg)_ | - | diff --git a/packages/vant/src/coupon/index.less b/packages/vant/src/coupon/index.less index ad577d2e7..9b0c9b1fe 100644 --- a/packages/vant/src/coupon/index.less +++ b/packages/vant/src/coupon/index.less @@ -5,6 +5,7 @@ --van-coupon-margin: @coupon-margin; --van-coupon-content-height: @coupon-content-height; --van-coupon-content-padding: @coupon-content-padding; + --van-coupon-content-text-color: @coupon-content-text-color; --van-coupon-background-color: @coupon-background-color; --van-coupon-active-background-color: @coupon-active-background-color; --van-coupon-border-radius: @coupon-border-radius; @@ -37,7 +38,7 @@ box-sizing: border-box; min-height: var(--van-coupon-content-height); padding: var(--van-coupon-content-padding); - color: var(--van-gray-8); + color: var(--van-coupon-content-text-color); } &__head { diff --git a/packages/vant/src/coupon/var.less b/packages/vant/src/coupon/var.less index 55fd55f93..f15efb613 100644 --- a/packages/vant/src/coupon/var.less +++ b/packages/vant/src/coupon/var.less @@ -3,6 +3,7 @@ @coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm); @coupon-content-height: 84px; @coupon-content-padding: 14px 0; +@coupon-content-text-color: var(--van-text-color); @coupon-background-color: var(--van-background-color-light); @coupon-active-background-color: var(--van-active-color); @coupon-border-radius: var(--van-border-radius-lg); diff --git a/packages/vant/src/style/var.less b/packages/vant/src/style/var.less index b39bae0aa..0a0754a15 100644 --- a/packages/vant/src/style/var.less +++ b/packages/vant/src/style/var.less @@ -27,12 +27,12 @@ @warning-color: var(--van-orange); @text-color: var(--van-gray-8); @text-color-secondary: var(--van-gray-6); +@text-link-color: #576b95; @active-color: var(--van-gray-2); @active-opacity: 0.7; @disabled-opacity: 0.5; @background-color: var(--van-gray-1); @background-color-light: var(--van-white); -@text-link-color: #576b95; // Padding @padding-base: 4px;