mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
chore: adjust some css vars for dark mode (#9782)
This commit is contained in:
parent
541373f994
commit
14987857ca
@ -196,7 +196,7 @@ export default {
|
||||
|
||||
```html
|
||||
<van-checkbox-group v-model="checked">
|
||||
<van-cell-group>
|
||||
<van-cell-group inset>
|
||||
<van-cell
|
||||
v-for="(item, index) in list"
|
||||
clickable
|
||||
|
@ -214,7 +214,7 @@ export default {
|
||||
|
||||
```html
|
||||
<van-checkbox-group v-model="checked">
|
||||
<van-cell-group>
|
||||
<van-cell-group inset>
|
||||
<van-cell
|
||||
v-for="(item, index) in list"
|
||||
clickable
|
||||
|
@ -165,7 +165,7 @@ const toggleAll = () => {
|
||||
|
||||
<demo-block :title="t('title5')">
|
||||
<van-checkbox-group v-model="state.result3">
|
||||
<van-cell-group>
|
||||
<van-cell-group inset>
|
||||
<van-cell
|
||||
v-for="(item, index) in state.list"
|
||||
clickable
|
||||
@ -184,8 +184,6 @@ const toggleAll = () => {
|
||||
|
||||
<style lang="less">
|
||||
.demo-checkbox {
|
||||
background: var(--van-background-color-light);
|
||||
|
||||
.van-checkbox {
|
||||
margin: 0 0 8px 20px;
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-checkbox-group">
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell-group van-cell-group--inset">
|
||||
<div class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
@ -212,7 +212,7 @@ const copy = (icon: string, option: Record<string, unknown> = {}) => {
|
||||
height: 36px;
|
||||
margin: -4px 0 4px;
|
||||
padding: 0 5px;
|
||||
color: var(--van-gray-7);
|
||||
color: var(--van-text-color);
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ The component provides the following CSS variables, which can be used to customi
|
||||
| --van-password-input-info-font-size | _var(--van-font-size-md)_ | - |
|
||||
| --van-password-input-error-info-color | _var(--van-danger-color)_ | - |
|
||||
| --van-password-input-dot-size | _10px_ | - |
|
||||
| --van-password-input-dot-color | _var(--van-black)_ | - |
|
||||
| --van-password-input-dot-color | _var(--van-text-color)_ | - |
|
||||
| --van-password-input-text-color | _var(--van-text-color)_ | - |
|
||||
| --van-password-input-cursor-color | _var(--van-text-color)_ | - |
|
||||
| --van-password-input-cursor-width | _1px_ | - |
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
| --van-password-input-info-font-size | _var(--van-font-size-md)_ | - |
|
||||
| --van-password-input-error-info-color | _var(--van-danger-color)_ | - |
|
||||
| --van-password-input-dot-size | _10px_ | - |
|
||||
| --van-password-input-dot-color | _var(--van-black)_ | - |
|
||||
| --van-password-input-dot-color | _var(--van-text-color)_ | - |
|
||||
| --van-password-input-text-color | _var(--van-text-color)_ | - |
|
||||
| --van-password-input-cursor-color | _var(--van-text-color)_ | - |
|
||||
| --van-password-input-cursor-width | _1px_ | - |
|
||||
|
@ -9,7 +9,7 @@
|
||||
@password-input-info-font-size: var(--van-font-size-md);
|
||||
@password-input-error-info-color: var(--van-danger-color);
|
||||
@password-input-dot-size: 10px;
|
||||
@password-input-dot-color: var(--van-black);
|
||||
@password-input-dot-color: var(--van-text-color);
|
||||
@password-input-text-color: var(--van-text-color);
|
||||
@password-input-cursor-color: var(--van-text-color);
|
||||
@password-input-cursor-width: 1px;
|
||||
|
@ -141,7 +141,7 @@ export default {
|
||||
|
||||
```html
|
||||
<van-radio-group v-model="checked">
|
||||
<van-cell-group>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="Radio 1" clickable @click="checked = '1'">
|
||||
<template #right-icon>
|
||||
<van-radio name="1" />
|
||||
|
@ -155,7 +155,7 @@ export default {
|
||||
|
||||
```html
|
||||
<van-radio-group v-model="checked">
|
||||
<van-cell-group>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="单选框 1" clickable @click="checked = '1'">
|
||||
<template #right-icon>
|
||||
<van-radio name="1" />
|
||||
|
@ -123,7 +123,7 @@ const inactiveIcon = 'https://img.yzcdn.cn/vant/user-inactive.png';
|
||||
|
||||
<demo-block :title="t('withCell')">
|
||||
<van-radio-group v-model="radio5">
|
||||
<van-cell-group>
|
||||
<van-cell-group inset>
|
||||
<van-cell clickable :title="t('radio') + 1" @click="radio5 = '1'">
|
||||
<template #right-icon>
|
||||
<van-radio name="1" />
|
||||
@ -141,8 +141,6 @@ const inactiveIcon = 'https://img.yzcdn.cn/vant/user-inactive.png';
|
||||
|
||||
<style lang="less">
|
||||
.demo-radio {
|
||||
background: var(--van-background-color-light);
|
||||
|
||||
&-group {
|
||||
padding: 0 16px;
|
||||
|
||||
|
@ -265,7 +265,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-radio-group"
|
||||
role="radiogroup"
|
||||
>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell-group van-cell-group--inset">
|
||||
<div class="van-cell van-cell--clickable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
@ -204,5 +204,5 @@ The component provides the following CSS variables, which can be used to customi
|
||||
| --van-slider-button-width | _24px_ | - |
|
||||
| --van-slider-button-height | _24px_ | - |
|
||||
| --van-slider-button-border-radius | _50%_ | - |
|
||||
| --van-slider-button-background-color | _var(--van-background-color-light)_ | - |
|
||||
| --van-slider-button-background-color | _var(--van-white)_ | - |
|
||||
| --van-slider-button-box-shadow | _0 1px 2px rgba(0, 0, 0, 0.5)_ | - |
|
||||
|
@ -206,5 +206,5 @@ import type { SliderProps } from 'vant';
|
||||
| --van-slider-button-width | _24px_ | - |
|
||||
| --van-slider-button-height | _24px_ | - |
|
||||
| --van-slider-button-border-radius | _50%_ | - |
|
||||
| --van-slider-button-background-color | _var(--van-background-color-light)_ | - |
|
||||
| --van-slider-button-background-color | _var(--van-white)_ | - |
|
||||
| --van-slider-button-box-shadow | _0 1px 2px rgba(0, 0, 0, 0.5)_ | - |
|
||||
|
@ -7,5 +7,5 @@
|
||||
@slider-button-width: 24px;
|
||||
@slider-button-height: 24px;
|
||||
@slider-button-border-radius: 50%;
|
||||
@slider-button-background-color: var(--van-background-color-light);
|
||||
@slider-button-background-color: var(--van-white);
|
||||
@slider-button-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
||||
|
@ -141,7 +141,7 @@ The component provides the following CSS variables, which can be used to customi
|
||||
| --van-switch-width | _2em_ | - |
|
||||
| --van-switch-height | _1em_ | - |
|
||||
| --van-switch-node-size | _1em_ | - |
|
||||
| --van-switch-node-background-color | _var(--van-background-color-light)_ | - |
|
||||
| --van-switch-node-background-color | _var(--van-white)_ | - |
|
||||
| --van-switch-node-box-shadow | _0 3px 1px 0 rgba(0, 0, 0, 0.05)_ | - |
|
||||
| --van-switch-background-color | _var(--van-background-color-light)_ | - |
|
||||
| --van-switch-on-background-color | _var(--van-primary-color)_ | - |
|
||||
|
@ -153,7 +153,7 @@ import type { SwitchProps } from 'vant';
|
||||
| --van-switch-width | _2em_ | - |
|
||||
| --van-switch-height | _1em_ | - |
|
||||
| --van-switch-node-size | _1em_ | - |
|
||||
| --van-switch-node-background-color | _var(--van-background-color-light)_ | - |
|
||||
| --van-switch-node-background-color | _var(--van-white)_ | - |
|
||||
| --van-switch-node-box-shadow | _0 3px 1px 0 rgba(0, 0, 0, 0.05)_ | - |
|
||||
| --van-switch-background-color | _var(--van-background-color-light)_ | - |
|
||||
| --van-switch-on-background-color | _var(--van-primary-color)_ | - |
|
||||
|
@ -4,7 +4,7 @@
|
||||
@switch-width: 2em;
|
||||
@switch-height: 1em;
|
||||
@switch-node-size: 1em;
|
||||
@switch-node-background-color: var(--van-background-color-light);
|
||||
@switch-node-background-color: var(--van-white);
|
||||
@switch-node-box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05),
|
||||
0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
|
||||
@switch-background-color: var(--van-background-color-light);
|
||||
|
Loading…
x
Reference in New Issue
Block a user