fix: restore syntax highlighting text color in code blocks #4
@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: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:
color: inherit !important; from the pre code selector that was overriding syntax highlighter color schemes📊 Impact Assessment:
color: inherit !important; rule reduces CSS specificity conflicts and makes the codebase more maintainable. Future syntax highlighters will work correctly without requiring workarounds.<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>
@beetle on any PR to start analysis manually@beetle stop to stop any ongoing analysis</details>
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- review_stack_entry_start -->

<!-- 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>
</details>
<details>
<summary>🧪 Generate unit tests (beta)</summary>
</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>
</details>
<sub>Comment @coderabbitai help to get the list of available commands.</sub>
<!-- tips_end -->
✅ 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>
@beetle on any PR to start analysis manually@beetle stop to stop any ongoing analysis</details>
</details>
✅ 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 🙌
DsThakurRawat
SaikrishnaReddy1919
Fixes #3
The global
pre codereset inassets/enhancements.cssincludedcolor: 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 inlanguage-httpblocks) 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 -->