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

Add "danger" and "note" CSS classes #115176

Closed

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Aug 24, 2023

After #106561, some people asked me if it would be possible to add "note" and "danger" equivalents. I think having multiple levels is a good idea so I added them. Here are screenshots of the results for each theme:

Screenshot from 2023-08-24 17-34-00
Screenshot from 2023-08-24 17-34-05
Screenshot from 2023-08-24 17-34-11

cc #79710

r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 24, 2023
@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

A change occurred in the Ayu theme.

cc @Cldfire

@jsha
Copy link
Contributor

jsha commented Aug 24, 2023 via email

@camelid
Copy link
Member

camelid commented Aug 24, 2023

An additional problem is that if we distinguish these levels based only on icon colors, it's not accessible to people who are color-blind or otherwise visually impaired.

@GuillaumeGomez
Copy link
Member Author

Both your comments make perfect sense so I'll just close this. I'll provide my thoughts on how I came to do this:

I wanted to have a difference between "if you do that, things might not work" and "if you do that, it'll crash badly". At this point, I thought people might also want to highlight some information, hence the "note".

Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants