element-plus [Style] [radio-button] radio-button background variable error

knpiaxh1  于 4个月前  发布在  其他
关注(0)|答案(6)|浏览(44)

Bug Type: Style

Environment

  • Vue Version: 3.2.47
  • Element Plus Version: 2.2.36
  • Browser / OS: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
  • Build Tool: Vite

Reproduction

  • el-radio-button

Element Plus Playground

Steps to reproduce

Set the css var dynamically

What is Expected?

You shouldn't change the background color

What is actually happening?

Changed the background color

Additional comments

dark 模式下是正常的

yvgpqqbh

yvgpqqbh1#

fill : border and background color when button is active

You modified the css var for the background color of the default button state, isn't the change normal?

yebdmbv4

yebdmbv42#

fill : border and background color when button is active

You modified the css var for the background color of the default button state, isn't the change normal?

If you do not use fill, it will also be affected by css var.

hc8w905p

hc8w905p3#

Since this is the default background color variable for the button and you changed it, shouldn't it change? radio-button is also a button

pnwntuvh

pnwntuvh4#

But the button is unaffected.

e37o9pze

e37o9pze5#

You can check the variables, and you will find that there is another layer of variables under .el-button.

cx6n0qe3

cx6n0qe36#

Ok, I see the problem.

相关问题