waveterm/frontend/app/element/menu.less

55 lines
1.4 KiB
Plaintext

.menu {
position: absolute;
display: flex;
max-width: 400px;
padding: 2px;
flex-direction: column;
justify-content: flex-end;
align-items: flex-start;
gap: 1px;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.15);
background: #212121;
box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.3);
.menu-item {
padding: 4px 6px;
cursor: pointer;
color: #fff;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
letter-spacing: -0.12px;
width: 100%;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: space-between;
/* Make sure the label and the icon don't overlap */
.label {
flex: 1; /* Allow the label to take up available space */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-right: 8px; /* Add some space between label and icon */
}
i {
color: var(--main-text-color);
flex-shrink: 0; /* Prevent icon from shrinking */
}
&:hover,
&.active {
background-color: var(--accent-color);
color: var(--button-text-color);
i {
color: var(--button-text-color);
}
}
}
}