Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add colour to version change directives#185

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

Merged
hugovk merged 1 commit intopython:mainfromhugovk:versionchanged-sidebars
Mar 29, 2024

Conversation

@hugovk
Copy link
Member

@hugovkhugovk commentedMar 29, 2024
edited
Loading

Similar to the sidebars inPEP 7 andPEP 8, we can add coloured sidebars and text to the version change directives.

Dark theme

image

Light theme

image

Accessibility check

  • We're not relying on the colour in the sidebar or text to convey meaning. The words remains as before.
  • The text like "Changed in version x.y" is now in colour. The contrast ratio meets at least the WCAG AA guidelines (4.5), with all but one meeting AAA (7.0).
  • In dark mode, the same colour is used for the sidebar and the text:
    • Green: 7.13 (AAA)
    • Yellow: 12.07 (AAA)
    • Red: 4.53 (AA)
  • In light mode, the sidebar colour is the same as in dark mode. The text needs to be darker to be readable:
    • Green: 7.08 (AAA)
    • Orange: 7.11 (AAA)
    • Red: 7.09 (AAA)

versionremoved

I also pre-emptively applied the red styling for theversionremoved directive, which will be released in the next Sphinx 7.3.0 (sphinx-doc/sphinx#11905).

Comparison with other themes

This is similar to how theAwesome theme does it.

These themes also add a background colour:

AndNefertiti for Sphinx adds a coloured box around it.

erlend-aasland reacted with rocket emoji
@hugovkhugovk changed the titleAdd coloured sidebars to versionadded/changed/deprecatedAdd colour to version change directivesMar 29, 2024
Copy link
Contributor

@willingcwillingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks@hugovk. I would love to see us move away from red and green. Since the wording is here too, I'm less concerned. When we work with an accessibility designer, we should come up with best practice light/dark themes for accessiblity.

erlend-aasland, hugovk, and pradyunsg reacted with thumbs up emoji
@hugovkhugovk merged commit5d781d2 intopython:mainMar 29, 2024
@hugovkhugovk deleted the versionchanged-sidebars branchMarch 29, 2024 21:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@willingcwillingcwillingc approved these changes

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@hugovk@willingc@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp