Skip to content

fix: code block style nits#670

Open
pqoqubbw wants to merge 2 commits into
lightsparkdev:mainfrom
pqoqubbw:main
Open

fix: code block style nits#670
pqoqubbw wants to merge 2 commits into
lightsparkdev:mainfrom
pqoqubbw:main

Conversation

@pqoqubbw

@pqoqubbw pqoqubbw commented Jul 8, 2026

Copy link
Copy Markdown
Before After
CleanShot 2026-07-08 at 1  21 13@2x CleanShot 2026-07-08 at 1  21 46@2x
CleanShot 2026-07-08 at 2  07 28@2x CleanShot 2026-07-08 at 2  07 19@2x

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

@pqoqubbw is attempting to deploy a commit to the Lightspark Team Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes two targeted CSS fixes to code block presentation in the Mintlify documentation site.

  • Adds a @layer utilities block so the border-radius: 0 override can win against Mintlify's own layered Tailwind !important utility (rounded-xt!), with a third selector covering standalone code blocks that include a header; a well-explained comment documents the cascade reason.
  • Adds a [data-fade-overlay] rule that sets --fade-color-dark to the custom dark-mode codeblock background token so the horizontal-scroll fade gradient matches the surrounding background in dark mode.

Confidence Score: 5/5

Safe to merge — purely additive CSS with no logic changes and accurate inline documentation explaining the cascade reasoning.

Both additions are narrowly scoped: the @layer utilities block targets specific data-component-part attributes already used elsewhere in the file, and the [data-fade-overlay] rule touches only the dark-mode fade gradient color token. The existing unlayered rules are preserved as a fallback, and the comment correctly explains why the layered override is necessary.

No files require special attention.

Important Files Changed

Filename Overview
mintlify/style.css Adds a @layer utilities block to correctly override Mintlify's layered !important border-radius, and a [data-fade-overlay] rule to align the dark-mode scroll fade color with the codeblock background.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Browser renders Mintlify code block"] --> B{"Is border-radius\nset by Tailwind utility\n(rounded-xt! / @layer utilities)?"}
    B -- "Yes (layered !important)" --> C["@layer utilities override\nborder-radius: 0 !important\nwith higher specificity div selector"]
    B -- "No (unlayered)" --> D["Pre-existing unlayered\nborder-radius: 0 !important\nstill applies"]
    C --> E["Code block: square corners ✓"]
    D --> E

    A --> F{"Dark mode scroll\nfade overlay?"}
    F -- "Yes ([data-fade-overlay])" --> G["--fade-color-dark set to\nvar(--ls-gray-975)\nmatches dark codeblock bg"]
    G --> H["Fade gradient blends\nseamlessly ✓"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["Browser renders Mintlify code block"] --> B{"Is border-radius\nset by Tailwind utility\n(rounded-xt! / @layer utilities)?"}
    B -- "Yes (layered !important)" --> C["@layer utilities override\nborder-radius: 0 !important\nwith higher specificity div selector"]
    B -- "No (unlayered)" --> D["Pre-existing unlayered\nborder-radius: 0 !important\nstill applies"]
    C --> E["Code block: square corners ✓"]
    D --> E

    A --> F{"Dark mode scroll\nfade overlay?"}
    F -- "Yes ([data-fade-overlay])" --> G["--fade-color-dark set to\nvar(--ls-gray-975)\nmatches dark codeblock bg"]
    G --> H["Fade gradient blends\nseamlessly ✓"]
Loading

Reviews (1): Last reviewed commit: "nits" | Re-trigger Greptile

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.

1 participant