Skip to content

Commit

Permalink
feat: custom suggest-widget style
Browse files Browse the repository at this point in the history
  • Loading branch information
purocean committed Sep 21, 2023
1 parent f81b71c commit 18efc12
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/renderer/components/MonacoEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ export default defineComponent({
}
</style>

<style>
<style lang="scss">
@import '@fe/styles/mixins.scss';
.monaco-editor .inputarea {
display: unset;
box-sizing: content-box;
Expand All @@ -120,4 +122,24 @@ export default defineComponent({
.monaco-editor .margin-view-overlays {
user-select: none;
}
.editor .monaco-editor .suggest-widget {
background-color: rgba(var(--g-color-98-rgb), 0.6);
backdrop-filter: var(--g-backdrop-filter);
border-radius: var(--g-border-radius);
box-shadow: rgba(0, 0, 0, 0.2) 2px 2px 5px;
--vscode-editorSuggestWidget-selectedBackground: var(--g-color-active-a);
--vscode-list-hoverBackground: var(--g-color-active-x);
--vscode-editorSuggestWidget-selectedForeground: var(--g-color-0);
--vscode-editorSuggestWidget-focusHighlightForeground: var(--vscode-editorSuggestWidget-highlightForeground);
}
@include dark-theme {
.editor .monaco-editor .suggest-widget {
background: rgba(var(--g-color-86-rgb), 0.65);
box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 10px;
--vscode-editorSuggestWidget-selectedBackground: var(--g-color-active-b);
--vscode-list-hoverBackground: var(--g-color-active-a);
}
}
</style>
1 change: 1 addition & 0 deletions src/renderer/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
--g-color-accent: rgb(20, 112, 251);
--g-color-anchor: #4c93e2;

--g-color-active-x: #{rgba(var(--g-color-0-rgb), 0.05)};
--g-color-active-a: #{rgba(var(--g-color-0-rgb), 0.1)};
--g-color-active-b: #{rgba(var(--g-color-0-rgb), 0.15)};
--g-color-active-c: #{rgba(var(--g-color-0-rgb), 0.2)};
Expand Down

1 comment on commit 18efc12

@vercel
Copy link

@vercel vercel bot commented on 18efc12 Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.