Inline and lazy-load EasyMDE CSS, fix border colors#36714
Merged
silverwind merged 4 commits intogo-gitea:mainfrom Feb 26, 2026
Merged
Inline and lazy-load EasyMDE CSS, fix border colors#36714silverwind merged 4 commits intogo-gitea:mainfrom
silverwind merged 4 commits intogo-gitea:mainfrom
Conversation
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. - 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 - Scope dark theme CodeMirror overrides under .EasyMDEContainer - Remove unused gutter, line number, and other unconfigured styles - Move .editor-loading to codeeditor.css where it belongs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes EasyMDE styling by inlining and lazy-loading the EasyMDE/CodeMirror CSS at the point where EasyMDE is enabled, while also aligning editor border colors with the app’s theme input border variables and reducing global style leakage.
Changes:
- Remove global EasyMDE CSS import and lazy-load the new
easymde.cssalongside the EasyMDE JS chunk. - Inline and scope EasyMDE + CodeMirror base styles under
.EasyMDEContainer, using theme variables (notably for borders). - Scope CodeMirror dark-theme token colors under
.EasyMDEContainerand relocate.editor-loadingstyling tocodeeditor.css.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| web_src/js/index-domready.ts | Removes global EasyMDE CSS import to enable lazy-loading. |
| web_src/js/features/comp/ComboMarkdownEditor.ts | Lazy-loads EasyMDE CSS together with the EasyMDE JS import. |
| web_src/css/index.css | Drops always-on imports for CodeMirror base and the old file editor CSS. |
| web_src/css/features/codeeditor.css | Adds .editor-loading base styling after moving it out of editor-specific CSS. |
| web_src/css/editor/fileeditor.css | Removes old global EasyMDE toolbar/preview/statusbar styling (now handled elsewhere). |
| web_src/css/easymde.css | New inlined + scoped EasyMDE/CodeMirror stylesheet loaded on-demand. |
| web_src/css/codemirror/dark.css | Scopes dark theme CodeMirror token colors to .EasyMDEContainer to avoid global leakage. |
| web_src/css/codemirror/base.css | Removes old scoped overrides now incorporated into easymde.css. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: silverwind <me@silverwind.io>
The ::before/::after rules on .editor-toolbar.fullscreen never had a content declaration, so they were never rendered. Remove them entirely rather than trying to fix them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
techknowlogick
approved these changes
Feb 25, 2026
lunny
approved these changes
Feb 26, 2026
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Feb 26, 2026
* main: (24 commits) Instance-wide (global) info banner and maintenance mode (go-gitea#36571) Add created_by filter to SearchIssues (go-gitea#36670) Inline and lazy-load EasyMDE CSS, fix border colors (go-gitea#36714) Fix release draft access check logic (go-gitea#36720) Change image transparency grid to CSS (go-gitea#36711) Avoid opening new tab when downloading actions logs (go-gitea#36740) Add validation constraints for repository creation fields (go-gitea#36671) Fix SVG height calculation in diff viewer (go-gitea#36748) Fix path resolving (go-gitea#36734) [skip ci] Updated translations via Crowdin Fix track time list permission check (go-gitea#36662) Fix incorrect setting loading order (go-gitea#36735) Use case-insensitive matching for Git error "Not a valid object name" (go-gitea#36728) feat: Add workflow dependencies visualization (go-gitea#36248) Add keyboard shortcuts for repository file and code search (go-gitea#36416) Refactor text utility classes to Tailwind CSS (go-gitea#36703) Prevent redirect bypasses via backslash-encoded paths (go-gitea#36660) Fix force push time-line commit comments of pull request (go-gitea#36653) Fix get release draft permission check (go-gitea#36659) Move `X_FRAME_OPTIONS` setting from `cors` to `security` section (go-gitea#30256) ... # Conflicts: # web_src/css/base.css # web_src/css/index.css
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Feb 27, 2026
* giteaofficial/main: Filter out untracked files from spellchecking (go-gitea#36756) Fix CSS stacking context issue in actions log (go-gitea#36749) Fix milestone/project text overflow in issue sidebar (go-gitea#36741) Update tool dependencies and fix new lint issues (go-gitea#36702) Instance-wide (global) info banner and maintenance mode (go-gitea#36571) Add created_by filter to SearchIssues (go-gitea#36670) Inline and lazy-load EasyMDE CSS, fix border colors (go-gitea#36714)
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Feb 27, 2026
* origin/main: Move Fomantic dropdown CSS to custom module (go-gitea#36530) Use "Enable Gravatar" but not "Disable" (go-gitea#36771) feat: add branch_count to repository API (go-gitea#35351) (go-gitea#36743) Deprecate RenderWithErr (go-gitea#36769) Lazy-load some Vue components, fix heatmap chunk loading on every page (go-gitea#36719) Filter out untracked files from spellchecking (go-gitea#36756) Fix CSS stacking context issue in actions log (go-gitea#36749) Fix milestone/project text overflow in issue sidebar (go-gitea#36741) Update tool dependencies and fix new lint issues (go-gitea#36702) Instance-wide (global) info banner and maintenance mode (go-gitea#36571) Add created_by filter to SearchIssues (go-gitea#36670) Inline and lazy-load EasyMDE CSS, fix border colors (go-gitea#36714) # Conflicts: # templates/repo/issue/view_content/pull_merge_box.tmpl # web_src/js/features/repo-issue-pull.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.