fix(layer): add proper code block styling with Tailwind import#7
fix(layer): add proper code block styling with Tailwind import#7
Conversation
- Import Tailwind CSS base to fix Alert/Callout color variables - Add code block CSS variables (--code, --code-foreground, --code-highlight, --code-number) - Add [data-pretty-code-figure] styling with proper border-radius and overflow handling - Replace [data-shiki] selectors with Shiki-compatible selectors - Hide scrollbars on code blocks with -ms-overflow-style and scrollbar-width - Add [data-line] styling for proper line height and padding - Remove overflow-x-auto from tabs-item to eliminate unwanted scrollbar on short content Fixes code block display issues with missing backgrounds and improper styling.
Summary of ChangesHello @amondnet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refines the visual presentation and functionality of code blocks and related components across the application. It resolves several styling inconsistencies, ensuring a more polished and user-friendly experience, particularly concerning theme integration, code readability, and scroll behavior. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively resolves code block styling issues by adding the necessary Tailwind CSS import and implementing a comprehensive set of new styles. The use of CSS variables for theming and modern CSS features is well done. The related fix in index.md to remove overflow-x-auto is also a good change. My review includes a couple of minor suggestions for the new CSS to improve conciseness and consistency, but overall this is a solid improvement.
- Combine border-bottom properties into shorthand for conciseness - Add !important to light mode Shiki color rule for consistency with dark mode - Add explanatory comment for !important usage
Summary
Fixes code block styling issues by adding missing Tailwind CSS base import and implementing comprehensive code block styling with proper backgrounds, borders, and overflow handling.
Changes
@import "tailwindcss"to fix Alert/Callout color variables--code,--code-foreground,--code-highlight,--code-number)[data-pretty-code-figure]and[data-line]attributes.lineand[data-line]styling for proper spacing and alignmentoverflow-x-autofrom tabs-item to eliminate unwanted horizontal scrollbarIssues Fixed
Test Plan