mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
style(components): [tag] fix icon in slot causing text wrap (#23725)
* Remove display flex from icon class in tag.scss
```css
.el-tag .el-icon {
display: flex;
}
```
el-icon已经有了`display: inline-flex`,此处设置`display: flex;`会导致el-icon变成一个块,最终导致图标和文字换行。el-tag带图标的使用场景通常是图标和文字同一行。因此删掉`display: flex;`。
* fix: update icon style
---------
Co-authored-by: rzzf <cszhjh@gmail.com>
This commit is contained in:
@@ -113,7 +113,6 @@ $tag-icon-span-gap: map.merge(
|
||||
$svg-margin-size: 1px;
|
||||
|
||||
.#{$namespace}-icon {
|
||||
display: flex;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -134,6 +133,10 @@ $tag-icon-span-gap: map.merge(
|
||||
outline: 2px solid getCssVar('color-primary');
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.#{$namespace}-icon {
|
||||
display: flex; // #22530
|
||||
}
|
||||
}
|
||||
|
||||
@include m(dark) {
|
||||
|
||||
Reference in New Issue
Block a user