This commit is contained in:
Vanessa 2023-03-27 10:59:12 +08:00
parent bebf6ad3c6
commit fe4efa73a7
2 changed files with 7 additions and 4 deletions

View File

@ -317,15 +317,18 @@
align-items: center; align-items: center;
svg { svg {
height: 16px; border-radius: 10px;
width: 16px; height: 8px;
width: 8px;
color: var(--b3-theme-on-surface); color: var(--b3-theme-on-surface);
transition: var(--b3-transition); transition: var(--b3-transition);
padding: 4px;
opacity: 0; opacity: 0;
} }
&:hover svg { &:hover svg {
opacity: 1 !important; color: var(--b3-theme-on-background);
background-color: var(--b3-theme-background-light);
} }
} }
} }

View File

@ -45,7 +45,7 @@ export class Tab {
iconHTML = `<span class="item__icon">${unicode2Emoji(options.docIcon)}</span>`; iconHTML = `<span class="item__icon">${unicode2Emoji(options.docIcon)}</span>`;
} }
this.headElement.innerHTML = `${iconHTML}<span class="item__text">${escapeHtml(options.title)}</span> this.headElement.innerHTML = `${iconHTML}<span class="item__text">${escapeHtml(options.title)}</span>
<span class="item__close"><svg><use xlink:href="#iconCloseRound"></use></svg></span>`; <span class="item__close"><svg><use xlink:href="#iconClose"></use></svg></span>`;
this.headElement.addEventListener("mouseenter", (event) => { this.headElement.addEventListener("mouseenter", (event) => {
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();