Skip to content

Commit 0836bce

Browse files
authored
fix(markup): add gravity theme to autocomplete snippet (#279)
1 parent 6c0792a commit 0836bce

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/markup/codemirror/gravity.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,31 @@ export const gravityTheme = EditorView.baseTheme({
4848
'&.cm-focused .cm-selectionBackground, &.cm-focused ::selection': {
4949
background: 'var(--g-color-base-misc-medium)',
5050
},
51+
'.cm-tooltip.cm-tooltip-autocomplete': {
52+
padding: '4px 0',
53+
lineHeight: '24px',
54+
color: 'var(--g-color-text-primary)',
55+
fontFamily: 'var(--g-font-family-monospace)',
56+
fontSize: 'var(--g-text-body-1-font-size)',
57+
backgroundColor: 'var(--g-color-base-float)',
58+
border: '1px solid var(--g-color-line-generic-solid)',
59+
borderRadius: '4px',
60+
61+
'& > ul': {
62+
'& > completion-section': {
63+
color: 'var(--g-color-text-hint)',
64+
fontWeight: 'var(--g-text-accent-font-weight)',
65+
borderBottom: '1px solid var(--g-color-line-generic)',
66+
},
67+
68+
'& > li:hover': {
69+
backgroundColor: 'var(--g-color-base-simple-hover)',
70+
},
71+
72+
'& > li[aria-selected]': {
73+
backgroundColor: 'var(--g-color-base-selection)',
74+
color: 'revert',
75+
},
76+
},
77+
},
5178
});

0 commit comments

Comments
 (0)