Skip to content
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

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

leops
Copy link
Contributor

@leops leops commented Nov 8, 2022

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 and gh-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 the rome npm package: https://www.npmjs.com/package/rome/v/0.10.1-nightly.a9db0f0). I've replaced the images with the standard picture element to automatically select the correct version of the image using the prefers-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

@leops leops requested a review from a team November 8, 2022 13:15
@netlify
Copy link

netlify bot commented Nov 8, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 5ee2a2f
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/636a567288449200083d5166

@leops leops merged commit d3351fd into main Nov 8, 2022
@leops leops deleted the fix/npm-readme-logo branch November 8, 2022 13:26
jeysal added a commit to jeysal/rometools that referenced this pull request Nov 8, 2022
* upstream/main:
  fix(rome_js_analyze): improve the logic of jsx_reference_identifier_is_fragment (rome#3592)
  doc: Fix configuration example
  Add crossorigin header
  Improve font performance
  release: 10.0.0 (rome#3526)
  fix(docs): use the standard picture element to display the logo (rome#3585)
@leops leops added the A-Documentation Area: documentation label Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Documentation Area: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants