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

Restore default colours for enums (green) and type definitions (orange-ish) #1612

Closed
glts opened this issue Jan 20, 2022 · 6 comments
Closed

Comments

@glts
Copy link

glts commented Jan 20, 2022

Recently docs built on docs.rs use the same purple colour for struct types, enum types, and type definitions.

Compare when building docs locally: only struct types are purple, enum types are green, and type definitions are orange.

Any reason for this change? Types in different colours are helpful when scanning signatures etc. Please revert to different colours for different types if possible.

@syphar
Copy link
Member

syphar commented Jan 20, 2022

@glts docs.rs is using nightly to build the docs, so this is probably a recent change to nightly.

cc @GuillaumeGomez ?

@glts
Copy link
Author

glts commented Jan 20, 2022

@syphar Thank you. Pity, but I will get used to it.

@glts glts closed this as completed Jan 20, 2022
@GuillaumeGomez
Copy link
Member

I can't find the PR and issue for this change. Do you have them by any chance @jsha ?

@jsha
Copy link
Contributor

jsha commented Jan 20, 2022

It was discussed in this issue and landed in this PR. @glts if you have examples of documentation pages that you find harder to read after this change, I'd be interested to take a look! There are some additional improvements I'd like to make to how slice brackets are colored; I'm curious to see if that would help with your use cases.

@Xiphoseer
Copy link

Personally, I think it's a significant part of the API whether the main way to interact with a type is using match val or val.field. So to be able to visually distinguish between enums and structs on pages like https://docs.rs/serde_json/latest/serde_json/value/fn.to_value.html for related types like Value has been useful to me in the past.

@GuillaumeGomez
Copy link
Member

Please open an issue on the rust repository and tag me and @jsha so we can discuss it.

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

No branches or pull requests

5 participants