Skip to content

fix(theme): h2 gap and twoslash codeblock style#2786

Merged
SoonIter merged 1 commit intomainfrom
syt/fix-gap-doc
Nov 19, 2025
Merged

fix(theme): h2 gap and twoslash codeblock style#2786
SoonIter merged 1 commit intomainfrom
syt/fix-gap-doc

Conversation

@SoonIter
Copy link
Member

Summary

fix(theme): h2 gap and twoslash codeblock style

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 19, 2025 04:17
@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 709f343
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/691d44ec5d1e6c0008e3befd
😎 Deploy Preview https://deploy-preview-2786--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes spacing issues in the theme by adjusting the h2 bottom margin and improving twoslash codeblock integration by removing conflicting styles.

  • Reduced h2 margin-bottom from 2rem to 1.25rem to align with h3 spacing and improve visual consistency
  • Added a new .twoslash .rp-codeblock selector to reset border, border-radius, box-shadow, and margins for better integration
  • Removed redundant padding and border-radius properties from .twoslash .rp-codeblock__content

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/plugin-twoslash/static/global-styles/twoslash.css Adds style resets for twoslash codeblocks to remove borders, shadows, and margins, and removes now-redundant padding and border-radius from the content element
packages/core/src/theme/components/DocContent/doc.scss Reduces h2 bottom margin from 2rem to 1.25rem for better spacing consistency with h3, and adds a clarifying comment to the p element margin

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

📁 web

Path: website/doc_build/web/rsdoctor-data.json

Metric Current Baseline Change
📊 Total Size 14.3 MB 14.3 MB 54.0 B (0.0%)
📄 JavaScript 13.8 MB 13.8 MB 0 B (0.0%)
🎨 CSS 109.5 KB 109.5 KB 54.0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 497.3 KB 497.3 KB 0 B (0.0%)

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

@SoonIter SoonIter merged commit 28adb3c into main Nov 19, 2025
16 checks passed
@SoonIter SoonIter deleted the syt/fix-gap-doc branch November 19, 2025 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants