-
Notifications
You must be signed in to change notification settings - Fork 854
fix: DC-5453 Update highlighted code padding #7136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRemoved top corner rounding for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Comment |
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/theme/CodeBlock/Line/styles.module.scss (1)
10-15: Align left gutter math: adjust padding-left from 42px → 32pxYou moved the marker from 16px → 8px but line padding remains 42px, which increases the gap. Suggest reducing the left padding on added/deleted/edited lines to 32px for consistent alignment.
Apply:
:global(.theme-code-block-added-line) { background-color: var(--docusaurus-added-code-line-bg); display: block; - padding: 0 var(--ifm-pre-padding) 0 42px; + padding: 0 var(--ifm-pre-padding) 0 32px; position: relative; } ... :global(.theme-code-block-deleted-line) { background-color: var(--docusaurus-deleted-code-line-bg); display: block; - padding: 0 var(--ifm-pre-padding) 0 42px; + padding: 0 var(--ifm-pre-padding) 0 32px; position: relative; } ... :global(.theme-code-block-edited-line) { background-color: var(--docusaurus-edited-code-line-bg); display: block; - padding: 0 var(--ifm-pre-padding) 0 42px; + padding: 0 var(--ifm-pre-padding) 0 32px; position: relative; }Also applies to: 22-27, 35-40
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/css/custom.css(1 hunks)src/theme/CodeBlock/Line/styles.module.scss(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: runner / linkspector
- GitHub Check: Check internal links
- GitHub Check: Lost Pixel
🔇 Additional comments (2)
src/css/custom.css (1)
1572-1575: Double‑check corner radius interactions with pre containerpre often owns the visual border radius. For consistency across themes, verify that removing only code’s top radii doesn’t clash with any radius on pre (flattened top on code but rounded pre). Test in light/dark and with/without title bars if present.
src/theme/CodeBlock/Line/styles.module.scss (1)
106-114: Verify mixed states: line numbers on/off, highlight + added/deleted/edited combosPadding and marker offsets can interact with:
- line numbers (.codeLineNumber/.codeLineContent),
- highlighted lines (.theme-code-block-highlighted-line),
- blocks with only deleted/edited lines.
Please spot-check these scenarios to avoid misalignment or double-indentation.
Deploying docs with
|
| Latest commit: |
300cd8e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://12f3eea7.docs-51g.pages.dev |
| Branch Preview URL: | https://fix-dc-5453-highlight-code.docs-51g.pages.dev |
Fixes #DC-5453
Summary by CodeRabbit