Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork66
Use different colour for 'Return value: Borrowed reference'#188
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
FYI As a color blind person, I don't see the difference between "Borrowed reference" and "New reference" colors in thelight mode. Well, I'm also color blind, so my opinion may not matter :-) In the dark mode, I see clearly that the two colors are very different. |
flying-sheep commentedApr 19, 2024
If you’re reusing existing colors, how about you centralize their definition as a CSS variables and then use it from both your new CSS rules and the old ones that originally defined the color? |
hugovk commentedApr 24, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
erlend-aasland left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't have a strong opinion regarding naming, but I like the change! Personally, I would prefer borrowed references to be labelled as "bad", but that is a different discussion.
97952b5
intopython:mainUh oh!
There was an error while loading.Please reload this page.
This is now deployed:https://docs.python.org/3/c-api/exceptions.html |
Uh oh!
There was an error while loading.Please reload this page.
Follow on frompython/cpython#117926.
Currently light green is used for all return types:
For example:https://docs.python.org/3/c-api/exceptions.html
A borrowed reference is not necessarily a "bad" thing, but we may want to use something other than green that indicates it's "good", to indicate they should be treated with care.
This PR uses the same yellow/orange colour as the "Changed in version x.y" text in#185 - I've already checked the contrast ratios in that PR and both meet WCAG AAA. By using the same colour, it will be easier to check/change when we audit.
For example:https://python-docs-theme-previews--188.org.readthedocs.build/en/188/c-api/exceptions.html#querying-the-error-indicator