Some improvements to completion info tooltip for new CM version

Signed-off-by: Julius Volz <julius.volz@gmail.com>
pull/14448/head
Julius Volz 8 months ago
parent a1f36de67c
commit 0cc6645c2d

@ -47,7 +47,6 @@ export const baseTheme = EditorView.theme({
}, },
".cm-tooltip.cm-completionInfo": { ".cm-tooltip.cm-completionInfo": {
marginTop: "-11px",
padding: "10px", padding: "10px",
fontFamily: fontFamily:
"'Open Sans', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;", "'Open Sans', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;",
@ -67,6 +66,7 @@ export const baseTheme = EditorView.theme({
borderStyle: "solid", borderStyle: "solid",
borderColor: "transparent", borderColor: "transparent",
}, },
marginTop: "-11px",
marginLeft: "12px", marginLeft: "12px",
}, },
".cm-completionInfo.cm-completionInfo-left": { ".cm-completionInfo.cm-completionInfo-left": {
@ -80,9 +80,23 @@ export const baseTheme = EditorView.theme({
borderStyle: "solid", borderStyle: "solid",
borderColor: "transparent", borderColor: "transparent",
}, },
marginTop: "-11px",
marginRight: "12px", marginRight: "12px",
}, },
".cm-completionInfo.cm-completionInfo-right-narrow": {
"&:before": {
content: "' '",
height: "0",
position: "absolute",
width: "0",
top: "-20px",
borderWidth: "10px",
borderStyle: "solid",
borderColor: "transparent",
},
marginTop: "10px",
marginLeft: "150px",
},
".cm-completionMatchedText": { ".cm-completionMatchedText": {
textDecoration: "none", textDecoration: "none",
fontWeight: "bold", fontWeight: "bold",
@ -172,6 +186,11 @@ export const lightTheme = EditorView.theme(
borderRightColor: "#d6ebff", borderRightColor: "#d6ebff",
}, },
}, },
".cm-tooltip > .cm-completionInfo.cm-completionInfo-right-narrow": {
"&:before": {
borderBottomColor: "#d6ebff",
},
},
".cm-tooltip > .cm-completionInfo.cm-completionInfo-left": { ".cm-tooltip > .cm-completionInfo.cm-completionInfo-left": {
"&:before": { "&:before": {
borderLeftColor: "#d6ebff", borderLeftColor: "#d6ebff",
@ -230,6 +249,11 @@ export const darkTheme = EditorView.theme(
borderRightColor: "#333338", borderRightColor: "#333338",
}, },
}, },
".cm-tooltip > .cm-completionInfo.cm-completionInfo-right-narrow": {
"&:before": {
borderBottomColor: "#333338",
},
},
".cm-tooltip > .cm-completionInfo.cm-completionInfo-left": { ".cm-tooltip > .cm-completionInfo.cm-completionInfo-left": {
"&:before": { "&:before": {
borderLeftColor: "#333338", borderLeftColor: "#333338",

Loading…
Cancel
Save