mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-11-28 05:00:26 +08:00
The `ellipsis()` mixin in `mixins.scss` was only used in two files.
Replaced with plain CSS and removed the file entirely.
## Changes
- **Converted mixin usage to plain CSS** in `flyoutmenu.scss` and
`expandablemenu.scss`:
```scss
// Before
.label {
@include mixins.ellipsis();
}
// After
.label {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
```
- **Removed unused imports** from 8 SCSS files that imported
`mixins.scss` but didn't use it
- **Deleted** `frontend/app/mixins.scss`
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
> in mixins.scss we have one last one called ellipsis(). i believe it is
only used in a couple places now... at least flyoutmenu.scss and
expandablemenu.scss. lets convert those to just plain CSS instead of
using the mixin. and then i think we can delete the mixins.scss file
completely... maybe 8 or so scss files that include it that will also
need modification.
>
> do your own check though to find any additional usages of mixins.scss
and the ellipsis mixin. make sure we remove all usages.
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
74 lines
1.7 KiB
SCSS
74 lines
1.7 KiB
SCSS
// Copyright 2024, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
.expandable-menu {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
overflow: visible;
|
|
}
|
|
|
|
.expandable-menu-item,
|
|
.expandable-menu-item-group-title {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 8px 12px; /* Left and right padding, we'll adjust this for the right side */
|
|
cursor: pointer;
|
|
box-sizing: border-box;
|
|
border-radius: 4px;
|
|
|
|
.label {
|
|
display: block;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
|
|
.expandable-menu-item-group-title {
|
|
&:hover {
|
|
background-color: var(--button-grey-hover-bg);
|
|
}
|
|
}
|
|
|
|
.expandable-menu-item {
|
|
&.with-hover-effect {
|
|
&:hover {
|
|
background-color: var(--button-grey-hover-bg);
|
|
}
|
|
}
|
|
}
|
|
|
|
.expandable-menu-item-left,
|
|
.expandable-menu-item-right {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.expandable-menu-item-left {
|
|
margin-right: 8px; /* Space for the left element */
|
|
}
|
|
|
|
.expandable-menu-item-right {
|
|
margin-left: auto; /* This keeps the right element (if any) on the far right */
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.expandable-menu-item-content {
|
|
flex-grow: 1; /* Ensures the content grows to fill available space between left and right elements */
|
|
}
|
|
|
|
.expandable-menu-item-group-content {
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
margin-left: 16px; /* Retaining left indentation */
|
|
margin-right: 0; /* Removing right padding */
|
|
|
|
&.open {
|
|
max-height: 1000px; /* Ensure large enough max-height for expansion */
|
|
}
|
|
}
|
|
|
|
.no-indent .expandable-menu-item-group-content {
|
|
margin-left: 0; // Remove left indentation when noIndent is true
|
|
}
|