This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
fix(docs): use the standard picture element to display the logo #3585
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.
Summary
This fixes how the Rome logo is displayed in the README when the markdown file is rendered outside of GitHub. The logo exists in two versions for dark and light mode, and the correct version to display in the readme was selected using the
gh-light-mode-only
andgh-dark-mode-only
fragments. This logic is GitHub-specific though, and doesn't work when the readme file is rendered outside of GitHub (for instance on therome
npm package: https://www.npmjs.com/package/rome/v/0.10.1-nightly.a9db0f0). I've replaced the images with the standardpicture
element to automatically select the correct version of the image using theprefers-color-scheme: dark
CSS media query.I've also rolled up a simple fix to the
release_js_api
workflow into this, it fixes the creation of GitHub releases for the API by removing the attachments since the JS API doesn't have any build artifact.Test Plan
Push a new nightly version to npm and check the logo is only rendered once