element-plus / element-plus

🎉 A Vue.js 3 UI Library made by Element team

Home Page:https://element-plus.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Style] [button] 自动样式的相关问题

MoConWu opened this issue · comments

Bug Type: Style

Environment

  • Vue Version: 3.4.27
  • Element Plus Version: 2.7.2
  • Browser / OS: Windows
  • Build Tool: Vite

Reproduction

Related Component

  • el-button

Reproduction Link

Element Plus Playground

Steps to reproduce

按钮自动添加了margin-left: 12px;
对于横向布局没有问题,但是纵向的时候,就不对了

What is Expected?

考虑修复纵向的情况

What is actually happening?

考虑修复纵向的情况

Additional comments

(empty)

.el-button + .el-button {
margin-left: 12px;
}
导致了纵向按钮偏移
202458-下午-121403

并且我主动设置:
.el-button + .el-button {
margin-left: 0;
}
也不行,因为脚本始终会覆盖我的设置

commented
.el-button + .el-button{
  margin-left: 0 !important;
}
.el-button + .el-button{
  margin-left: 0 !important;
}

这确实可以主动解决,但是希望的是自适应或自动判断,横着的时候,可以自动添加,纵向的时候就不自动添加了

commented

外层样式属性无法判断哦,这个还是需要自行解决

外层样式属性无法判断哦,这个还是需要自行解决

好吧