Files
Gitea/web_src/css/features/codeeditor.css
silverwind 0d006290a7 Inline and lazy-load EasyMDE CSS, fix border colors (#36714)
Replace the external easymde.min.css import with an inlined and
lazy-loaded CSS file that uses proper theme variables for border colors.
All EasyMDE/CodeMirror rules are scoped under `.EasyMDEContainer`,
removing the need for !important overrides.

- Fixes easymde borders, these were broken since a while now
- Scope all easymde styles to .EasyMDEContainer
- Inline easymde.min.css and codemirror.css into web_src/css/easymde.css
- Lazy-load the CSS alongside the JS in switchToEasyMDE()
- Fix .editor-toolbar and .CodeMirror border colors to use
--color-input-border matching textarea inputs
- Remove unused gutter, line number, and other unconfigured styles
- Move .editor-loading to codeeditor.css where it belongs

<img width="891" height="518" alt="image"
src="https://github.com/user-attachments/assets/87495de5-7872-4645-90e7-96fe0f782f02"
/>

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-26 10:50:44 +00:00

48 lines
1.1 KiB
CSS

.editor-loading {
padding: 1rem;
text-align: center;
}
.monaco-editor-container,
.editor-loading.is-loading {
width: 100%;
min-height: 200px;
height: 90vh;
}
.edit.githook .monaco-editor-container {
border: 1px solid var(--color-secondary);
height: 70vh;
}
/* overwrite conflicting styles from fomantic */
.monaco-editor-container .inputarea {
min-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
resize: none !important;
border: none !important;
color: transparent !important;
background-color: transparent !important;
}
.monaco-editor,
.monaco-editor .overflow-guard {
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
/* fomantic styles destroy this element only visible on IOS, restore it */
.monaco-editor .iPadShowKeyboard {
border: none !important;
width: 58px !important;
min-width: 0 !important;
height: 36px !important;
min-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
position: absolute !important;
resize: none !important;
overflow: hidden !important;
border-radius: var(--border-radius-medium) !important;
}