fix(css): add background box for fenced code blocks (#439)#560
Merged
Conversation
Fenced code blocks (``` ... ```) were tokenized by mdEdit/Prism but only received a text color, so they were visually indistinguishable from surrounding text. Add a subtle background, padding and block display to `.mdedit .code-block` so fenced blocks render as a distinct box, matching the treatment inline `.code` already receives. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
added a commit
that referenced
this pull request
Jul 26, 2026
Demonstrates the .mdedit .code-block styling rendering a fenced code block as a shaded box in the Notes editor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Member
Author
|
Verified in a running ownCloud container (CSS The shading is intentionally subtle (10% gray on white). Confirmed objectively via pixel sampling rather than just eyeballing it: inside the block reads |
phil-davis
approved these changes
Jul 26, 2026
DeepDiver1975
added a commit
that referenced
this pull request
Jul 27, 2026
Since the version bump was authored, several user-facing PRs merged to master that will ship inside 2.2.0. Record them in the release notes: full translation backfill (#561), fenced-code-block background (#560), zh-Hans/Mongolian corrections (#559), duplicate de/de_DE key removal (#562), and the Transifex-sync retirement (#558). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
phil-davis
pushed a commit
that referenced
this pull request
Jul 27, 2026
* chore: bump version to 2.2.0 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> * docs(changelog): cover l10n and CSS changes shipping in 2.2.0 Since the version bump was authored, several user-facing PRs merged to master that will ship inside 2.2.0. Record them in the release notes: full translation backfill (#561), fenced-code-block background (#560), zh-Hans/Mongolian corrections (#559), duplicate de/de_DE key removal (#562), and the Transifex-sync retirement (#558). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --------- Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

What
Adds a
.mdedit .code-blockrule so fenced code blocks (``` ... ```) render as a distinct box with a subtle background, padding and block display.Why
Fenced code blocks were already tokenized by the vendored mdEdit/Prism renderer (
js/vendor/mdEdit/src/md.js), but the stylesheet only gave them a text color — no background — so they were visually indistinguishable from surrounding text. This matches the reused-looking treatment inline.codealready gets inmdedit.css.Reported in #439.
Scope
This is the minimal, focused version of the CSS change originally proposed in #440. That PR bundled several unrelated changes (a search feature, a PWA manifest,
.gitignorebuild-artifact entries, and atemplates/note.phpDOM change) and had gone stale with merge conflicts, so #440 is being closed in favor of this single-purpose PR.Testing
Manual: a fenced
```block in a note now renders with a shaded background box; inline and non-code text are unaffected.🤖 Generated with Claude Code