[UI/UX] Implement Technical Code Block Container & Monospace Contrast #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context: After implementing centered reader layouts, code snippets (
<pre>) are illegible due to low contrast and serif font inheritance.Role: Senior UI Engineer.
Task: Refactor the rendering of code blocks within
ReaderCanvas.razorto ensure high technical readability.Requirements:
<code>elements in a styled<pre>container with a subtle background:background-color: #f4f4f4;or a very light gray.font-family: 'JetBrains Mono', 'Fira Code', monospace;andfont-size: 0.9rem;.Contrast & Syntax: Use a dark slate color for text (
#2d3436) to ensure it stands out against the paper-white background.border-left: 4px solid var(--nexus-neon);.overflow-x: auto;to handle long code lines without breaking the 800px reader container.padding: 1.5rem;andborder-radius: 8px;.EpubService, ensure the sanitizer preserves<pre>and<code>tags but strips internal inline styles that might interfere with our new CSS.DOD: Code blocks must look like distinct, readable components that feel "engineered" compared to the surrounding Merriweather text.
Sugested css code (to adding in
ReaderCanvas.razor.css)