Skip to content

[Style] [tabs, tab-pane] 给el-tabs__item的style添加 padding-lert right !important 导致只有一个ElTabPane的时候下划线长度计算错误 #17006

@kcmeven

Description

@kcmeven

Bug Type: Style

Environment

  • Vue Version: 3.4.27
  • Element Plus Version: 2.7.3
  • Browser / OS: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0
  • Build Tool: Vite

Reproduction

Related Component

  • el-tabs
  • el-tab-pane

Reproduction Link

Element Plus Playground

Steps to reproduce

.demo-tabs {
  .el-tabs__header {
    .el-tabs__item {
      padding-right: 20px !important;
      padding-left: 20px  !important;
    }
  }
}

What is Expected?

样式正常

What is actually happening?

样式错误

Additional comments

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions