Fix broken inline code pill rendering when wrapping across lines - #5240
Fix broken inline code pill rendering when wrapping across lines#52407487 wants to merge 1 commit into
Conversation
Inline code pills in the docs get a border, background, and padding, but with the default box-decoration-break: slice the box is cut apart when a pill wraps at the end of a line, leaving stray half-boxes and misaligned fragments. Use box-decoration-break: clone (with the -webkit- prefix for Safari) so each line fragment renders as a complete pill. Fixes thunder-id#5235 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe documentation stylesheet now applies standard and WebKit ChangesInline code overflow styling
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The localized CSS change makes wrapped inline code fragments render as complete pills without changing application behavior; no actionable merge-blocking risk remains. Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation 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. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
docs/src/css/custom.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 |
Purpose
Inline code pills in the docs (the
.markdown codestyling indocs/src/css/custom.css) get a border, background, and padding. With the CSS defaultbox-decoration-break: slice, a pill that wraps at the end of a line is cut apart: the border and padding are sliced at the break, leaving a stray half-box at the end of one line and an open-edged fragment with misaligned content at the start of the next, as shown in the issue screenshot.Approach
Add
box-decoration-break: clone(plus the-webkit-prefix for Safari) to the existing inline code rule, so each line fragment renders as a complete pill with its own border, radius, and padding on all sides.Verified by reproducing the wrap locally with the same rule: with
slice(current behavior) the pill fragments into broken half-boxes at the line break; withcloneeach fragment is a clean, fully enclosed pill. This also keeps long inline code able to wrap, so it cannot cause horizontal overflow of the page.This was implemented with AI assistance (Claude Code), and reviewed by me.
Related Issues
Codeoverflow has UI issues #5235Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit