Skip to content

chore: light background for code snippets #707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dummdidumm
Copy link
Member

While working on tweaking dark mode I noticed that I find the content much easier to scan. Turns out it's because we don't give code blocks any background whatsoever, which in my view is a mistake. It makes the code too easy to mix up with the surrounding text when scrolling and searching for something.

This gives the code blocks a very very light grey background, which in my opinion achieves a sweet spot between making it easier to separate code from text while not getting in the way. (The fact that there was a commented-out --sk-back-3 makes me believe this was actually something on the todo list or something that was contemplated to do)

@Rich-Harris
Copy link
Member

The background was removed for the sake of the syntax highlighting, which suffers a bit with a background (except on dark mode, where the colours pop). I think the box works but needs to be a smidge lighter, and the bar for the filename feels too prominent.

Since those colours don't exist in our palette at the moment, I suspect we need to revisit our tokens in light of this and #699 — we have a bunch of different --sk-text-n and --sk-back-n tokens but no cohesive theory about what we're supposed to use when, and the colours themselves feel a bit random (e.g. tiny gap between 1, 2, 3 then a big jump to 4). Some uses (borders, bullets) are neither text nor back but a third thing.

This was referenced Oct 31, 2024
@Rich-Harris
Copy link
Member

merged #765, closing

@Rich-Harris Rich-Harris closed this Nov 4, 2024
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