Closed hugovk closed 3 months ago
This PR uses the same yellow/orange colour as the "Changed in version x.y" text in https://github.com/python/python-docs-theme/pull/185
FYI As a color blind person, I don't see the difference between "Borrowed reference" and "New reference" colors in the light 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.
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?
Good idea, shall we also replace the pale green for the other "Return value" with the "New in version" green?
The light mode ones are much closer, but we could replace one with the other here too?
Updated:
Suggestions for better variable names welcome :)
This is now deployed: https://docs.python.org/3/c-api/exceptions.html
Follow on from https://github.com/python/cpython/pull/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 https://github.com/python/python-docs-theme/pull/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