Skip to content

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

Closed
@glts

Description

@glts

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.

Activity

syphar

syphar commented on Jan 20, 2022

@syphar
Member

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

cc @GuillaumeGomez ?

glts

glts commented on Jan 20, 2022

@glts
Author

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

GuillaumeGomez

GuillaumeGomez commented on Jan 20, 2022

@GuillaumeGomez
Member

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

jsha

jsha commented on Jan 20, 2022

@jsha
Contributor

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

Xiphoseer commented on Jan 23, 2022

@Xiphoseer

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

GuillaumeGomez commented on Jan 23, 2022

@GuillaumeGomez
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jsha@syphar@glts@GuillaumeGomez@Xiphoseer

        Issue actions

          Restore default colours for enums (green) and type definitions (orange-ish) · Issue #1612 · rust-lang/docs.rs