Repository navigation
fix(frontend): style h6 and drop unused markdown CSS variables - #861
Conversation
h6 had no rule at all, so it missed the shared margin and font-weight that h1 through h5 share. Merge it into the h4/h5 rule, which already had identical declarations. Also remove --markdown-pre-background-color and --markdown-code-background-color. Both were declared in :root and [data-theme="dark"] but never referenced. Code block and inline code backgrounds come from the selected syntax highlighter theme in MarkdownCode.tsx, so wiring these variables up would conflict with it. Refs #857 Co-Authored-By: Claude Opus 5 <[email protected]>
✅ Deploy Preview for mdts-unhappychoice ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe markdown stylesheet removes pre/code background variables from theme declarations and consolidates shared styling for h4, h5, and h6 headings. ChangesMarkdown CSS cleanup
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/frontend/public/markdown.cssESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. 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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #861 +/- ##
=======================================
Coverage 99.19% 99.19%
=======================================
Files 70 70
Lines 1616 1616
Branches 387 387
=======================================
Hits 1603 1603
Misses 12 12
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Addresses two of the three points raised in #857.
h6had no rule at all, so it missed themargin/font-weighttreatment shared byh1throughh5. Merged into theh4/h5rule, which already had byte-identical declarations.--markdown-pre-background-colorand--markdown-code-background-color. Both were declared in:rootand[data-theme="dark"]but referenced zero times.Why the variables are removed rather than wired up
The issue suggests wiring the two variables into
.markdown-body pre/.markdown-body code. That would conflict with how code rendering actually works today.PrismAsyncLightinMarkdownCode.tsx, which applies the style of the syntax highlighter theme the user selects in Settings.syntaxHighlighterThemeMeta.colorin the same component.Both follow the selected syntax highlighter theme by design, so a CSS background would fight the user's choice. The variables are leftovers from before that behavior moved into the component.
Heading colors are intentionally left alone
The third point in the issue, adding a
colorto headings, is not included. The current CSS conveys hierarchy through font size plus aborder-bottomonh1/h2, which matches the convention GitHub's own Markdown rendering uses. Discussion continues on the issue.Visual impact
h6only. It moves from browser defaults to the same treatment ash4/h5. Nothing else changes, since the removed variables had no effect.Refs #857
🤖 Generated with Claude Code
Summary by CodeRabbit