Update images to support dark mode #7195
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #7187
Description
Adding better support for dark mode image rendering.
Discussion
I elected to have the smallest change possible here and explicitly changed the transparent backgrounds to white for
docs/assets/IRgraph_markstep.png
,docs/assets/IRgraph_no_markstep.png
anddocs/assets/pytorchXLA_flow.svg
.Another approach is to use GitHub's theme context for images in Markdown. For
docs/assets/spmd_debug_1.png
anddocs/assets/spmd_debug_2.png
I decided to use a light theme for these images and upload.I don't think you want to have 2 versions of every image floating around, but for some cases (like the
docs/spmd.md
) it may make sense to have this as a toggle of imagesHappy to update the PR accordingly. Thanks!
Examples
docs/assets/pytorchXLA_flow.svg
beforedocs/assets/pytorchXLA_flow.svg
afterdocs/assets/IRgraph_no_markstep.png
beforedocs/assets/IRgraph_no_markstep.png
afterdocs/assets/IRgraph_markstep.png
beforedocs/assets/IRgraph_markstep.png
afterdocs/spmd.md
dark toggle updatedocs/spmd.md
light toggle updatedocs/spmd.md
light toggle before (in light mode)