kaxil opened a new pull request, #1334:
URL: https://github.com/apache/airflow-site/pull/1334

   ## Problem
   
   Blog code blocks had incorrect syntax highlighting where different Python 
token types (e.g., `from` keyword and `airflow.sdk` namespace) appeared with 
identical colors. Additionally, code blocks had excessive vertical spacing.
   
   ## Changes
   
   ### Syntax Highlighting
   - **Scope Pygments styles to `.rst-content`**: Prevents Pygments (used by 
Sphinx docs) from overriding Chroma (used by Hugo blog posts)
   - **Import Docsy Chroma dark theme**: Added `@import "td/code-dark";` to 
enable proper token colorization in blog posts
   - **Remove `.chroma` from `_highlights.scss`**: Changed selectors from 
`.chroma, .highlight` to just `.highlight` to target only Sphinx/RST content
   
   ### Spacing Fixes
   - **Exclude code spans from margin**: Modified `.markdown-content p, span` 
selector to `p:not(.chroma span), span:not(.chroma span)` to prevent 30px 
bottom margin on code tokens
   - **Reduce code block padding**: Changed `pre` margin/padding from 40px/16px 
to 1rem for more compact display
   
   ## Impact
   
   - ✅ **Blog posts**: Now use Chroma with distinct colors for different token 
types
   - ✅ **Sphinx docs**: Unaffected - Pygments styles remain scoped to 
`.rst-content`
   - ✅ **Spacing**: Code blocks no longer have excessive line height
   
   ## Before/After
   
   Screenshots will be added in a comment below.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to