Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions packages/theme/src/button/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
color: var(--ti-button-normal-text-color);
fill: var(--ti-button-normal-text-color);
font-size: var(--ti-button-font-size);
min-width: var(--ti-button-size-normal-min-width);
white-space: nowrap;
text-overflow: ellipsis;
cursor: pointer;
Expand Down Expand Up @@ -61,10 +60,8 @@

&.is-only-icon {
width: var(--ti-button-only-icon-width);
min-width: var(--ti-button-only-icon-min-width);
padding: 0 var(--ti-button-only-icon-padding-horizontal);
padding: 0;
border-radius: var(--ti-button-only-icon-border-radius);
border-color: var(--ti-button-only-icon-border-color);

&:hover {
border-color: var(--ti-button-only-icon-hover-border-color);
Expand All @@ -78,6 +75,9 @@
}
}
}
&.is-only-icon.is-circle {
width: unset;
}

&::-moz-focus-inner {
border: 0;
Expand Down Expand Up @@ -157,9 +157,6 @@
);
}

& + & {
margin-left: 8px;
}

&.is-loading {
position: relative;
Expand Down
10 changes: 2 additions & 8 deletions packages/theme/src/button/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
--ti-button-loading-bg-color: rgba(255, 255, 255, 0.5);
--ti-button-loading-font-size: var(--ti-common-font-size-1);

// 默认按钮最小宽度
--ti-button-size-normal-min-width: var(--ti-common-size-24x);
// 默认按钮最大宽度
--ti-button-size-normal-max-width: var(--ti-common-size-width-medium, 120px);
// 默认按钮的高度
Expand Down Expand Up @@ -436,15 +434,11 @@
// 纯图标按钮最小宽度
--ti-button-icon-font-size: var(--ti-common-font-size-2);
// 纯图标/文字按钮宽度
--ti-button-only-icon-width: var(--ti-common-size-8x);
--ti-button-only-icon-min-width: unset;
--ti-button-only-icon-width: 32px;
--ti-button-only-icon-text-width: var(--ti-common-size-6x);
// 纯图标按钮水平内边距
--ti-button-only-icon-padding-horizontal: 7px;

// 纯图标按钮边框圆角
--ti-button-only-icon-border-radius: var(--ti-common-border-radius-3);
// 纯图标按钮边框颜色
--ti-button-only-icon-border-color: #c2c2c2;
// 纯图标按钮悬浮时边框颜色
--ti-button-only-icon-hover-border-color: #191919;
// 纯图标按钮禁用时边框颜色
Expand Down
4 changes: 0 additions & 4 deletions packages/theme/src/mixins/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,4 @@
width: @svg-width;
height: @svg-height;
}

&.is-only-icon {
min-width: unset;
}
}