waveterm/frontend/app/tab/tab.less
2024-07-08 15:02:52 -07:00

104 lines
2.3 KiB
Plaintext

// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
.tab {
position: absolute;
width: 130px;
height: 100%;
padding: 6px 3px;
box-sizing: border-box;
font-weight: bold;
color: var(--secondary-text-color);
.tab-inner {
position: relative;
width: 100%;
height: 100%;
white-space: nowrap;
border-radius: 6px;
background: rgba(35, 35, 35, 0.8);
}
&.animate {
transition:
transform 0.3s ease,
background-color 0.3s ease-in-out;
}
&.active {
.base-bg {
background: rgba(0, 0, 0, 0.6);
position: absolute;
top: 6px;
left: 3px;
right: 3px;
bottom: 6px;
}
.tab-inner {
background: radial-gradient(ellipse at top, rgba(118, 255, 53, 0.1) 0%, transparent 120%),
radial-gradient(ellipse at bottom, rgba(117, 255, 53, 0.135) 0%, transparent 90%);
}
.mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(
to bottom,
rgb(57, 56, 56) 25%,
rgba(255, 255, 255, 0.201) 90%,
rgba(255, 255, 255, 0.215) 100%
);
opacity: 0.95;
border-radius: 5px;
z-index: 2;
pointer-events: none;
}
}
.name {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
user-select: none;
z-index: 3;
font-size: 11px;
font-weight: 500;
&.focused {
outline: none;
border: 1px solid rgba(255, 255, 255, 0.179);
padding: 2px 6px;
border-radius: 2px;
}
}
.close {
visibility: hidden;
position: absolute;
top: 50%;
right: 0px;
transform: translateY(-50%);
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0.5;
z-index: 3;
&:hover {
opacity: 1;
}
}
&.active:hover .close {
visibility: visible;
}
}