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
Related Component
el-radio-button
Reproduction Link
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 模式下是正常的
6条答案
按热度按时间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?
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.
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
pnwntuvh4#
But the button is unaffected.
e37o9pze5#
You can check the variables, and you will find that there is another layer of variables under .el-button.
cx6n0qe36#
Ok, I see the problem.