← Back to Pull requests

fix: restore syntax highlighting text color in code blocks #4

Merged
SaikrishnaReddy1919 merged 1 files (1 lines) on Aug 29, 2026 10:31 UTC
View on GitHub
SaikrishnaReddy1919 SaikrishnaReddy1919 commented on Aug 29, 2026 08:20 UTC
Author

Fixes #3

The global pre code reset in assets/enhancements.css included color: inherit !important, which forced highlight.js's base text color to inherit the near-black body color. On the dark code-block background this made plain/untagged tokens (identifiers, keywords, and # lines in language-http blocks) invisible until manually selected. Colored tokens (strings/numbers/comments) were unaffected because their color lives on inner spans.

Removing that one line lets the atom-one-dark theme's base color apply again, restoring readable code across all chapters. The remaining background/padding/border resets are kept.

Introduced in f9ac000.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

Bug Fixes
Fixed code blocks so their text displays with the correct color against dark backgrounds.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 1 lines (+0 / -1) across 1 files Reviewer: DsThakurRawat Review duration: 131m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.12) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.12 · 1 lines diff across 1 files
0.12
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.93 · 4 substantive comment(s)
0.93
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
90%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Ai Authored ai_authored
0.050
Diff Size diff_size
0.041
Real PR Conversation Timeline
6 items
vercel[bot] vercel[bot] commented on Aug 29, 2026 08:20 UTC
Bot

@SaikrishnaReddy1919 is attempting to deploy a commit to the DsThakurRawat's projects Team on Vercel.

A member of the Team first needs to authorize it.

beetle-ai[bot] beetle-ai[bot] commented on Aug 29, 2026 08:20 UTC
Bot

<!-- beetle:main-comment -->

Summary by Beetle


This PR addresses a syntax highlighting issue by removing an overly broad CSS rule that was interfering with code block styling. The change removes a color: inherit !important; declaration from the pre code selector in the enhancements stylesheet, allowing syntax highlighters to properly apply their own color schemes to code blocks without being overridden by this blanket rule.

📁 File Changes Summary (Consolidated across all commits):


| File | Status | Changes | Description |
|------|--------|---------|-------------|
| assets/enhancements.css | Modified | +0/-1 | Removed color: inherit !important; from pre code CSS rule to fix syntax highlighting interference. The rule was preventing syntax highlighters from applying their own color schemes to code elements. |

Total Changes: 1 file changed, +0 additions, -1 deletion

🎯 Key Changes:


  • Removed conflicting CSS rule: Deleted color: inherit !important; from the pre code selector that was overriding syntax highlighter color schemes

  • Minimal, surgical fix: Single-line deletion that directly addresses the root cause of the syntax highlighting issue

  • Preserves other styling: Maintains all other code block styling rules (background, padding, border-radius, font-size) that provide consistent formatting

  • 📊 Impact Assessment:


  • Security: ✅ No security implications. This is a purely cosmetic CSS change with no security surface area.

  • Performance: ✅ Positive impact. Removing a CSS rule slightly reduces stylesheet size and eliminates unnecessary style computation for code elements.

  • Maintainability: ✅ Improved. The removal of the conflicting color: inherit !important; rule reduces CSS specificity conflicts and makes the codebase more maintainable. Future syntax highlighters will work correctly without requiring workarounds.

  • Testing: ⚠️ Visual regression testing recommended. While this is a simple change, visual testing should verify that:

  • Syntax highlighting now displays correctly in code blocks

  • Other code block styling (padding, background, border-radius) remains intact

  • The change works across different syntax highlighter libraries (if applicable)
  • <details>
    <summary>⚙️ Settings</summary>

    Severity Threshold: Medium — Balanced feedback — medium and high severity issues only. — Change in Settings
    Custom Rules: Define your own review rules — Set Custom Rules
    PR Summary: Configure PR summary — Change in Settings

    </details>

    <details>
    <summary>📖 User Guide</summary>

  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis

  • Comment @beetle on any PR to start analysis manually

  • Comment @beetle stop to stop any ongoing analysis
  • </details>

    ---
    Follow us: Beetle · X · LinkedIn

    coderabbitai[bot] coderabbitai[bot] commented on Aug 29, 2026 08:20 UTC
    Bot

    <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
    <!-- review_stack_entry_start -->

    ![Review Change Stack](https://app.coderabbit.ai/change-stack/DsThakurRawat/Backend-from-first-Principle/pull/4)

    <!-- review_stack_entry_end -->
    <!-- recent_review_start -->

    No actionable comments were generated in the recent review. 🎉

    <details>
    <summary>ℹ️ Recent review info</summary>

    <details>
    <summary>⚙️ Run configuration</summary>

    Configuration used: defaults

    Review profile: CHILL

    Plan: Pro Plus

    Run ID: c42230d7-e7d9-4363-9e4d-fdd56d9cd04f

    </details>

    <details>
    <summary>📥 Commits</summary>

    Reviewing files that changed from the base of the PR and between bd6b8df48d49568cba06a2da069c407992f5b56b and 3c3e1852f41bb6a4ed3961520190727e5a771eb1.

    </details>

    <details>
    <summary>📒 Files selected for processing (1)</summary>

    assets/enhancements.css

    </details>

    <details>
    <summary>💤 Files with no reviewable changes (1)</summary>

    assets/enhancements.css

    </details>

    Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

    </details>

    ---

    <!-- recent_review_end -->
    <!-- walkthrough_start -->

    <details>
    <summary>📝 Walkthrough</summary>

    Walkthrough

    The change removes color: inherit !important from the global pre code rule. Code in dark pre blocks can now use the intended code-block text color.

    Changes

    |Cohort / File(s)|Summary|
    |---|---|
    |Code rendering <br> assets/enhancements.css|Removes the forced inherited color from pre code styling.|

    Estimated code review effort: 1 (Trivial) | ~2 minutes

    <!-- final_review_risk_start -->
    Merge Risk: _⚪ Minimal_ · up to 3c3e1

    This localized stylesheet change restores readable text in dark code blocks without changing other code-block styling. No actionable merge-blocking risk remains after normal checks and review.
    <!-- final_review_risk_end -->

    </details>

    <!-- walkthrough_end -->
    <!-- pre_merge_checks_walkthrough_start -->

    <details>
    <summary>🚥 Pre-merge checks | ✅ 5</summary>

    <details>
    <summary>✅ Passed checks (5 passed)</summary>

    | Check name | Status | Explanation |
    | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
    | Title check | ✅ Passed | The title clearly and concisely describes the main change: restoring syntax highlighting text color in code blocks. |
    | Linked Issues check | ✅ Passed | The CSS change directly addresses issue #3 by removing the rule that overrides syntax highlighting colors. This restores readable text in code blocks. |
    | Out of Scope Changes check | ✅ Passed | The pull request changes only one CSS declaration related to the reported code-rendering issue. No unrelated changes are present. |
    | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0… |

    </details>

    <details>
    <summary>Full details: Docstring Coverage</summary>

    Explanation

    No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files.

    </details>

    </details>

    <!-- pre_merge_checks_walkthrough_end -->
    <!-- finishing_touch_checkbox_start -->

    <details>
    <summary>✨ Finishing Touches 💡 1</summary>

    <!-- finishing_touch_suggestion:fix_ci -->
    <details open>
    <summary>🛠️ Fix failing CI checks 💡</summary>

  • <!-- {"checkboxId": "6d21cfe8-ec3f-40e2-9222-b8318b64d3b0", "radioGroupId": "fix-ci-output-choice-group-unknown_comment_id"} --> Create stacked PR

  • <!-- {"checkboxId": "9f0d24fb-b419-4f01-baf0-8b26b6424f34", "radioGroupId": "fix-ci-output-choice-group-unknown_comment_id"} --> Commit on current branch
  • </details>
    <details>
    <summary>🧪 Generate unit tests (beta)</summary>

  • <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests
  • </details>

    </details>

    <!-- finishing_touch_checkbox_end -->
    <!-- tips_start -->

    ---

    Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

    <details>
    <summary>❤️ Share</summary>

  • X

  • Mastodon

  • Reddit

  • LinkedIn
  • </details>

    <sub>Comment @coderabbitai help to get the list of available commands.</sub>

    <!-- tips_end -->

    beetle-ai[bot] beetle-ai[bot] commented on Aug 29, 2026 08:21 UTC
    Bot

    ✅ You're good to merge this PR! No issues found. Great job!

    <details>
    <summary>Settings</summary>

    <details>
    <summary>⚙️ Settings</summary>

    Severity Threshold: Medium — Balanced feedback — medium and high severity issues only. — Change in Settings
    Custom Rules: Define your own review rules — Set Custom Rules
    PR Summary: Configure PR summary — Change in Settings

    </details>

    <details>
    <summary>📖 User Guide</summary>

  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis

  • Comment @beetle on any PR to start analysis manually

  • Comment @beetle stop to stop any ongoing analysis
  • </details>

    </details>

    DsThakurRawat DsThakurRawat approved these changes on Aug 29, 2026 10:31 UTC
    Approved Reviewer

    ✅ LGTM — verified and approved.

    Confirmed the bug is real: the color: inherit !important on pre code in enhancements.css forces the body's near-black text color (#1c1a17) onto code blocks, overriding highlight.js's atom-one-dark base color (#abb2bf). This makes untagged tokens (identifiers, keywords, plain text) invisible against the dark #1a1c22 code background.

    Removing just that one line is the correct minimal fix — it lets the theme's base color apply while keeping the other necessary resets (background, padding, border-radius, font-size) intact.

    Affects all chapters using atom-one-dark: HTTP & CORS, gRPC, Docker/K8s, Testing, Kafka, WebSockets, and others.

    Nice catch and clean fix 🙌

    Reviewers
    Assignees
    SaikrishnaReddy1919 SaikrishnaReddy1919
    Labels
    risk: low confidence: 90.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 12.1% (LOW) · Higher = larger blast radius
    12.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 90.5% · Lower = rushed or shallow review
    90.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2% · Safe to merge
    2%