Skip to content

Conversation

Mister-Hope
Copy link
Member

@Mister-Hope Mister-Hope commented May 8, 2025

This PR unified all styles that are related to the default theme 1.5rem padding in mobile view to theme default scope.

@Mister-Hope Mister-Hope requested review from pengzhanbo and Copilot and removed request for pengzhanbo May 8, 2025 07:11
Copy link

@Copilot 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 unifies the code block styles in mobile view by standardizing padding, margins, transitions, and border radius values using theme-defined CSS variables. Key changes include updating transition properties, replacing hardcoded values with CSS variables, and removing redundant mobile media queries.

Reviewed Changes

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

Show a summary per file
File Description
tools/highlighter-helper/src/client/styles/notation-highlight.scss Added transition property for highlighted code lines using theme variables.
tools/highlighter-helper/src/client/styles/notation-diff.scss Added transition property for diff lines to align with unified styling.
tools/highlighter-helper/src/client/styles/code-block-title.scss Updated border radius and mobile margins to use CSS variables.
tools/highlighter-helper/src/client/styles/base.scss Introduced margin adjustments and transition properties along with print media white-space handling.
themes/theme-default/src/client/styles/content/code.scss Refactored code block styling within a [vp-content] scope and modified mobile styles.
plugins/markdown/plugin-revealjs/src/client/styles/reveal-js.scss Removed redundant mobile view styling for reveal.js slides.
plugins/markdown/plugin-markdown-tab/src/client/styles/tabs.scss Introduced a root variable for tab border radius and applied it to relevant elements.
plugins/markdown/plugin-markdown-tab/src/client/styles/code-tabs.scss Updated border radius and dimension properties to use theme variables for consistency.
Comments suppressed due to low confidence (2)

tools/highlighter-helper/src/client/styles/notation-highlight.scss:19

  • Consider verifying that '--vp-t-color' contains a valid timing value for transitions; its name might be interpreted as a color variable, which could be misleading.
transition: background-color var(--vp-t-color);

plugins/markdown/plugin-markdown-tab/src/client/styles/code-tabs.scss:54

  • Using '--code-border-radius' as a dimension for width and height might lead to unintended sizing if the variable is primarily intended for border radius; consider using a dedicated variable for sizing if necessary.
width: var(--code-border-radius);

@coveralls
Copy link

coveralls commented May 8, 2025

Pull Request Test Coverage Report for Build 14900980297

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 59.528%

Totals Coverage Status
Change from base Build 14886786784: 0.0%
Covered Lines: 1362
Relevant Lines: 2063

💛 - Coveralls

@Mister-Hope Mister-Hope marked this pull request as draft May 8, 2025 07:13
@Mister-Hope Mister-Hope marked this pull request as ready for review May 8, 2025 07:20
@Mister-Hope Mister-Hope merged commit e446824 into main May 8, 2025
30 checks passed
@Mister-Hope Mister-Hope deleted the code-block branch May 8, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants