Skip to content

Fix CodeTile background#1484

Open
MathCatsAnd wants to merge 1 commit into
streamlit:mainfrom
MathCatsAnd:fix-cheat-sheet-code-blocks
Open

Fix CodeTile background#1484
MathCatsAnd wants to merge 1 commit into
streamlit:mainfrom
MathCatsAnd:fix-cheat-sheet-code-blocks

Conversation

@MathCatsAnd

Copy link
Copy Markdown
Contributor

📚 Context

When the code blocks were reworked to add the headers, and exception was carved out to make them always dark in most places, but not the API ref cards. The cheat sheet fell through the cracks when this exception was implemented, adding and locking in the side fades, but not the text colors and background.

🧠 Description of Changes

As a minimal fix, this PR removes the side fades from the cheat sheet. This keeps the text without a distinct background and no margins to inset it from the headers.

A more complete fix might be to undo the forced dark mode for code blocks and then make all code block respect the theme and restyle the cheat sheet.

Note: There is no side fade on the blocks that have the horizontal scroll, so that's less clear, but it needs more spacing refinement to give it the horizontal space to accommodate the fades. Hence, minimal fix.

💥 Impact

After: Screenshot 2026-06-08 at 9 15 13 PM Screenshot 2026-06-08 at 9 15 21 PM
Before: Screenshot 2026-06-08 at 9 14 38 PM Screenshot 2026-06-08 at 9 14 55 PM

🌐 References

Closes #1447

Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@MathCatsAnd

Copy link
Copy Markdown
Contributor Author

@jrieke There is another contribution to fix this same issue differently, but I think it might require dealing with some additional cases.

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.

Cheat sheet page: first letter of code blocks clipped/hidden

1 participant