2021-07-21 03:30:53 +08:00
|
|
|
/* === Monaco overrides === */
|
|
|
|
|
|
|
|
/*
|
|
|
|
CSS normalization removes the default styles of HTML elements,
|
|
|
|
so we need to adjust styles of Monaco-rendered Markdown docs.
|
|
|
|
Also some spacing adjustments.
|
|
|
|
*/
|
|
|
|
|
|
|
|
.monaco-hover p,
|
2021-12-04 04:57:21 +08:00
|
|
|
.suggest-details p,
|
|
|
|
.parameter-hints-widget p {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply my-2 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggest-details h1,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover h1,
|
|
|
|
.parameter-hints-widget h1 {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply text-xl font-semibold mt-4 mb-2;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggest-details h2,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover h2,
|
|
|
|
.parameter-hints-widget h2 {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply text-lg font-medium mt-4 mb-2;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggest-details h3,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover h3,
|
|
|
|
.parameter-hints-widget h3 {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply font-medium mt-4 mb-2;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggest-details ul,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover ul,
|
|
|
|
.parameter-hints-widget ul {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply list-disc;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggest-details ol,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover ol,
|
|
|
|
.parameter-hints-widget ol {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply list-decimal;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggest-details hr,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover hr,
|
|
|
|
.parameter-hints-widget hr {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply my-2 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggest-details blockquote,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover blockquote,
|
|
|
|
.parameter-hints-widget blockquote {
|
2021-07-21 03:30:53 +08:00
|
|
|
@apply border-l-4 border-gray-200 pl-4 py-0.5 my-2;
|
|
|
|
}
|
2021-05-07 22:41:37 +08:00
|
|
|
|
|
|
|
/* Add some spacing to code snippets in completion suggestions */
|
2021-07-21 03:30:53 +08:00
|
|
|
.suggest-details div.monaco-tokenized-source,
|
2021-12-04 04:57:21 +08:00
|
|
|
.monaco-hover div.monaco-tokenized-source,
|
|
|
|
.parameter-hints-widget div.monaco-tokenized-source {
|
|
|
|
@apply my-2 whitespace-pre-wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Use z-index over cell icons */
|
|
|
|
.suggest-details,
|
|
|
|
.monaco-hover,
|
|
|
|
.parameter-hints-widget {
|
|
|
|
z-index: 100 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Adjust header spacing in completion details */
|
|
|
|
.suggest-details .header p {
|
|
|
|
@apply pb-0 pt-3 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Adjust divider in signature help widget */
|
|
|
|
.parameter-hints-widget .markdown-docs hr {
|
|
|
|
border-top: 1px solid rgba(69, 69, 69, 0.5);
|
|
|
|
margin-right: -8px;
|
|
|
|
margin-left: -8px;
|
2021-07-21 03:30:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Increase the hover box limits */
|
|
|
|
.monaco-hover-content {
|
|
|
|
max-width: 1000px !important;
|
|
|
|
max-height: 300px !important;
|
2021-05-07 22:41:37 +08:00
|
|
|
}
|
|
|
|
|
2021-12-04 04:57:21 +08:00
|
|
|
/* Increase the completion details box limits */
|
|
|
|
.suggest-details-container,
|
|
|
|
.suggest-details {
|
|
|
|
width: fit-content !important;
|
|
|
|
height: fit-content !important;
|
|
|
|
max-width: 420px !important;
|
|
|
|
max-height: 250px !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Adjust completion details spacing */
|
|
|
|
.suggest-details .header .type {
|
|
|
|
padding-top: 0 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* The content already has some padding */
|
|
|
|
.docs.markdown-docs {
|
|
|
|
margin: 0 !important;
|
|
|
|
}
|
|
|
|
|
2021-12-06 21:15:44 +08:00
|
|
|
/* Command palette height is computed based on editor height,
|
|
|
|
which is not what we want, since the editor can have just
|
|
|
|
a single line, hence we override with a fixed height */
|
|
|
|
.monaco-editor .quick-input-list .monaco-list {
|
|
|
|
max-height: 300px !important;
|
|
|
|
}
|
|
|
|
|
2021-07-21 03:30:53 +08:00
|
|
|
/* === Monaco cursor widget === */
|
2021-05-07 22:41:37 +08:00
|
|
|
|
|
|
|
.monaco-cursor-widget-container {
|
|
|
|
pointer-events: none;
|
|
|
|
z-index: 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
.monaco-cursor-widget-container .monaco-cursor-widget-cursor {
|
|
|
|
pointer-events: initial;
|
|
|
|
width: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.monaco-cursor-widget-container .monaco-cursor-widget-label {
|
|
|
|
pointer-events: initial;
|
|
|
|
transform: translateY(-200%);
|
|
|
|
white-space: nowrap;
|
|
|
|
padding: 1px 8px;
|
|
|
|
font-size: 12px;
|
|
|
|
color: #f8fafc;
|
|
|
|
|
|
|
|
visibility: hidden;
|
|
|
|
transition-property: visibility;
|
|
|
|
transition-duration: 0s;
|
|
|
|
transition-delay: 1.5s;
|
|
|
|
}
|
|
|
|
|
|
|
|
.monaco-cursor-widget-container .monaco-cursor-widget-label:hover {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
|
|
|
|
.monaco-cursor-widget-container
|
|
|
|
.monaco-cursor-widget-cursor:hover
|
|
|
|
+ .monaco-cursor-widget-label {
|
|
|
|
visibility: visible;
|
|
|
|
transition-delay: 0s;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* When in the first line, we want to display cursor and label in the same line */
|
|
|
|
.monaco-cursor-widget-container.inline {
|
2022-03-15 05:19:56 +08:00
|
|
|
display: flex !important;
|
2021-05-07 22:41:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.monaco-cursor-widget-container.inline .monaco-cursor-widget-label {
|
|
|
|
margin-left: 2px;
|
|
|
|
transform: none;
|
|
|
|
}
|