Skip to content

Highlight code blocks according to the current theme #1221

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

Merged
merged 2 commits into from
Dec 27, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Dec 25, 2020

r? @Nemo157

Closes #1127

@jyn514 jyn514 added A-frontend Area: Web frontend S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed A-docs-rs-themes Area: CSS themes in docs.rs itself labels Dec 25, 2020
@jyn514
Copy link
Member Author

jyn514 commented Dec 25, 2020

Dark mode:
image
Ayu:
image
Light (stays the same, but just in case):
image

Readme (Ayu):
image
Readme (Dark):
image

Source (Ayu):
image

So I think what I'm seeing is it would be nice to have another theme for Ayu mode, but I'm not sure if highlight.js has one. @Cldfire do you happen to know of one that matches?

@Cldfire
Copy link
Contributor

Cldfire commented Dec 25, 2020

So I think what I'm seeing is it would be nice to have another theme for Ayu mode, but I'm not sure if highlight.js has one. @Cldfire do you happen to know of one that matches?

There isn't a pre-existing one that I'm aware of, but I'd be happy to put one together tomorrow night, it won't take long 😄

EDIT: haven't gotten to this yet but will this afternoon

@jyn514
Copy link
Member Author

jyn514 commented Dec 25, 2020

Oh wow! That would be awesome if you have time ❤️ I was just hoping for something somewhat close.

@jyn514
Copy link
Member Author

jyn514 commented Dec 27, 2020

I think it makes sense to merge this as is and then work on the custom theme in a follow-up - this is already a big improvement even on ayu and it would make it easier for @Cldfire to PR against the main codebase instead of my fork I think.

@Nemo157 does this look good to you?

@jyn514 jyn514 merged commit ce51a77 into rust-lang:master Dec 27, 2020
@jyn514 jyn514 deleted the dark-codeblocks branch December 27, 2020 13:59
@jyn514 jyn514 added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Dec 28, 2020
@Cldfire Cldfire mentioned this pull request Dec 28, 2020
@jyn514 jyn514 removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs-rs-themes Area: CSS themes in docs.rs itself A-frontend Area: Web frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Themes don't update codeblocks, so they look a little blinding in night mode
3 participants