style(fe): standardize fixed 160px tab width with text ellipsis and native title tooltip
This commit is contained in:
@@ -53,7 +53,7 @@ const isTabActive = (tabId: string) => activeTabId.value === tabId
|
|||||||
@keydown.space.prevent="handleTabClick(tab.path)"
|
@keydown.space.prevent="handleTabClick(tab.path)"
|
||||||
>
|
>
|
||||||
<span class="ks-tabs__icon">{{ tab.icon }}</span>
|
<span class="ks-tabs__icon">{{ tab.icon }}</span>
|
||||||
<span class="ks-tabs__title">{{ tab.title }}</span>
|
<span class="ks-tabs__title" :title="tab.title">{{ tab.title }}</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="ks-tabs__close"
|
class="ks-tabs__close"
|
||||||
@@ -126,6 +126,9 @@ const isTabActive = (tabId: string) => activeTabId.value === tabId
|
|||||||
gap: var(--ks-space-2);
|
gap: var(--ks-space-2);
|
||||||
padding: 0 var(--ks-space-3);
|
padding: 0 var(--ks-space-3);
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
width: 160px;
|
||||||
|
min-width: 160px;
|
||||||
|
max-width: 160px;
|
||||||
background-color: var(--ks-color-neutral-100);
|
background-color: var(--ks-color-neutral-100);
|
||||||
border: 1px solid var(--ks-color-border);
|
border: 1px solid var(--ks-color-border);
|
||||||
border-radius: var(--ks-radius-sm);
|
border-radius: var(--ks-radius-sm);
|
||||||
@@ -134,6 +137,7 @@ const isTabActive = (tabId: string) => activeTabId.value === tabId
|
|||||||
font-size: var(--ks-font-grid);
|
font-size: var(--ks-font-grid);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
transition: var(--ks-transition-fast);
|
transition: var(--ks-transition-fast);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,9 +160,11 @@ const isTabActive = (tabId: string) => activeTabId.value === tabId
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ks-tabs__title {
|
.ks-tabs__title {
|
||||||
max-width: 150px;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ks-tabs__close {
|
.ks-tabs__close {
|
||||||
|
|||||||
Reference in New Issue
Block a user