gitea/web_src/css/modules
silverwind e2e8509239
Replace Monaco with CodeMirror (#36764)
- Replace monaco-editor with CodeMirror 6
- Add `--color-syntax-*` CSS variables for all syntax token types,
shared by CodeMirror, Chroma and EasyMDE
- Consolidate chroma CSS into a single theme-independent file
(`modules/chroma.css`)
- Syntax colors in the code editor now match the code view and
light/dark themes
- Code editor is now 12px instead of 14px font size to match code view
and GitHub
- Use a global style for kbd elements
- When editing existing files, focus will be on codemirror instead of
filename input.
- Keyboard shortcuts are roughtly the same as VSCode
- Add a "Find" button, useful for mobile
- Add context menu similar to Monaco
- Add a command palette (Ctrl/Cmd+Shift+P or F1) or via button
- Add clickable URLs via Ctrl/Cmd+click
- Add e2e test for the code editor
- Remove `window.codeEditors` global
- The main missing Monaco features are hover types and semantic rename
but these were not fully working because monaco operated only on single
files and only for JS/TS/HTML/CSS/JSON.

| | Monaco (main) | CodeMirror (cm) | Delta |
|---|---|---|---|
| **Build time** | 7.8s | 5.3s | **-32%** |
| **JS output** | 25 MB | 14 MB | **-44%** |
| **CSS output** | 1.2 MB | 1012 KB | **-17%** |
| **Total (no maps)** | 23.3 MB | 12.1 MB | **-48%** |

Fixes: #36311
Fixes: #14776
Fixes: #12171

<img width="1333" height="555" alt="image"
src="https://github.com/user-attachments/assets/f0fe3a28-1ed9-4f22-bf25-2b161501d7ce"
/>

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-03-31 21:50:45 +00:00
..
animations.css Add viewer controller for mermaid (zoom, drag) (#36557) 2026-02-10 06:36:31 +00:00
breadcrumb.css
button.css Refactor issue sidebar and fix various problems (#37045) 2026-03-31 10:03:52 +08:00
card.css
checkbox.css Clean up checkbox cursor styles (#37016) 2026-03-28 08:59:52 +01:00
chroma.css Replace Monaco with CodeMirror (#36764) 2026-03-31 21:50:45 +00:00
codeeditor.css Replace Monaco with CodeMirror (#36764) 2026-03-31 21:50:45 +00:00
comment.css Fix CODEOWNERS review request attribution using comment metadata (#36348) 2026-01-16 14:52:57 +00:00
container.css Instance-wide (global) info banner and maintenance mode (#36571) 2026-02-26 23:16:11 +08:00
dimmer.css
divider.css Move Fomantic dropdown CSS to custom module (#36530) 2026-02-27 16:45:10 +00:00
dropdown.css Update JS dependencies (#37001) 2026-03-27 04:39:24 +01:00
flexcontainer.css
form.css Rework checkbox styling, remove `input` border hover effect (#36870) 2026-03-23 17:41:04 +00:00
grid.css
header.css
input.css Add keyboard shortcuts for repository file and code search (#36416) 2026-02-23 17:20:56 +08:00
label.css Refactor issue sidebar and fix various problems (#37045) 2026-03-31 10:03:52 +08:00
list.css feat: Add configurable permissions for Actions automatic tokens (#36173) 2026-03-21 15:39:47 -07:00
menu.css
message.css Update message severity colors, fix navbar double border (#37019) 2026-03-28 09:05:56 +00:00
modal.css Migrate fomantic `search` and `modal` CSS to first-party modules (#36869) 2026-03-17 07:07:48 +01:00
navbar.css Fix theme discovery and Vite dev server in dev mode (#37033) 2026-03-30 14:59:10 +00:00
normalize.css
search.css Migrate fomantic `search` and `modal` CSS to first-party modules (#36869) 2026-03-17 07:07:48 +01:00
segment.css
shortcut.css Replace Monaco with CodeMirror (#36764) 2026-03-31 21:50:45 +00:00
svg.css
tab.css
table.css Remove striped tables in UI (#36509) 2026-02-11 01:58:56 +00:00
tippy.css
toast.css