Skip to content
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

Highlight code snippets in docs #14325

Merged
merged 1 commit into from Oct 1, 2020
Merged

Highlight code snippets in docs #14325

merged 1 commit into from Oct 1, 2020

Conversation

mrnugget
Copy link
Contributor

@mrnugget mrnugget commented Oct 1, 2020

This adds a little background color to <code> snippets in docs. It's
hard to spot the monospace font in some of the prose.

I'm probably breaking 18 CSS conventions by using rgba, em, etc. Happy to change anything here, but I mainly care about the background and if somebody wants to implement this properly: pleeease!

Compare left (without background color) and right:
screenshot_2020-10-01_08 47 44@2x

This adds a little background color to <code> snippets in docs. It's
hard to spot the monospace font in some of the prose.
@mrnugget mrnugget requested a review from sqs October 1, 2020 06:50
Copy link
Member

@sqs sqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Yeah, I had some weird fun with calc(0.25*var(--spacing)) and such in the code, but this is totally fine. Will merge.

Here's what it looks like in the dark theme (looks great):

image

@sqs sqs merged commit 1b004a4 into main Oct 1, 2020
@sqs sqs deleted the mrnugget/highlight-code-docs branch October 1, 2020 07:01
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.

None yet

2 participants