Skip to content

docs: fix Cloudflare logo not updating with theme toggle#7118

Open
kasimthecoder wants to merge 4 commits intoTanStack:mainfrom
kasimthecoder:fix-issue-693
Open

docs: fix Cloudflare logo not updating with theme toggle#7118
kasimthecoder wants to merge 4 commits intoTanStack:mainfrom
kasimthecoder:fix-issue-693

Conversation

@kasimthecoder
Copy link
Copy Markdown

@kasimthecoder kasimthecoder commented Apr 8, 2026

Fixes TanStack/tanstack.com#693

Summary:
The Cloudflare logo did not update when switching between light and dark themes.

Cause:
The implementation used prefers-color-scheme, which depends on system theme and does not react to the site's theme toggle.

Fix:
Replaced with conditional rendering using dark mode classes to ensure the logo updates correctly with theme changes.

Testing:
Verified that the logo switches correctly when toggling between light and dark themes.

Summary by CodeRabbit

  • Documentation
    • Improved dark‑mode handling for partner logos in the React and Solid hosting guides for more consistent visibility across themes.
    • Standardized alt text placement on images to improve accessibility and display consistency.
    • Fixed an inconsistent/broken logo asset for one partner to ensure correct rendering across light/dark modes.

@github-actions github-actions bot added the documentation Everything documentation related label Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5cb23f1e-3c0a-4d60-9c3d-547b0ab27058

📥 Commits

Reviewing files that changed from the base of the PR and between 809a2dc and 37b18dc.

📒 Files selected for processing (2)
  • docs/start/framework/react/guide/hosting.md
  • docs/start/framework/solid/guide/hosting.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/start/framework/react/guide/hosting.md
  • docs/start/framework/solid/guide/hosting.md

📝 Walkthrough

Walkthrough

Replaced <picture>/<source> partner logo markup with paired <img> elements controlled by Tailwind dark-mode visibility classes in the React and Solid hosting guides; moved alt attributes to images, swapped light/dark SVG sources for Cloudflare and Netlify, and introduced an incorrect arc attribute and a stray text line in the Solid guide.

Changes

Cohort / File(s) Summary
Hosting guide logo markup
docs/start/framework/react/guide/hosting.md, docs/start/framework/solid/guide/hosting.md
Replaced <picture> + <source> variants with two <img> tags per partner using block dark:hidden and hidden dark:block. Moved alt from wrapping <a> to each <img>. Swapped Cloudflare and Netlify SVG URLs so light/dark assets match visibility classes.
Railway image attribute anomaly
docs/start/framework/react/guide/hosting.md, docs/start/framework/solid/guide/hosting.md
Railway section changed to dual-<img> pattern but the first image uses a non-standard arc attribute (instead of src) in one instance and may have incorrect attribute ordering—needs correction to proper src, alt, width, and class usage.
Stray text insertion
docs/start/framework/solid/guide/hosting.md
An unintended literal line testing updats was added under the Cloudflare Workers section and should be removed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰
I nibbled through the markup maze,
Swapped pictures for images in day and haze,
Alt tags settled where they belong,
One stray line hopped off — short and strong,
Now logos beam and sing their praise. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes changes to Railway logos which were not mentioned in the linked issue #693, introducing out-of-scope modifications beyond the stated objectives. Clarify whether Railway logo changes are intentional or should be reverted to focus on the Cloudflare and Netlify requirements from issue #693.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions fixing the Cloudflare logo theme toggle issue, but the PR also addresses Netlify and Railway logos, making it partially incomplete.
Linked Issues check ✅ Passed The PR successfully addresses the main requirements from issue #693: Cloudflare and Netlify logos now use appropriate light/dark variants and respond to site theme changes via Tailwind classes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
docs/start/framework/solid/guide/hosting.md (1)

200-206: Consider updating Railway logo for consistency.

Similar to the React hosting guide, the Railway section still uses <picture> with prefers-color-scheme, which only responds to system preference. Consider updating to the dual <img> approach for consistency.

Note: The Solid guide uses different Railway image filenames (railway-dark.svg / railway-light.svg) compared to the React guide (railway-white.svg / railway-black.svg). Ensure you use the correct Solid-specific filenames if updating.

♻️ Suggested update for consistency
-<a href="https://railway.com?utm_source=tanstack" alt="Railway Logo">
-  <picture>
-    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg" width="280">
-    <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg" width="280">
-    <img alt="Railway logo" src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg" width="280">
-  </picture>
-</a>
+<a href="https://railway.com?utm_source=tanstack">
+  <img
+    class="block dark:hidden"
+    src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
+    width="280"
+    alt="Railway logo"
+  />
+  <img
+    class="hidden dark:block"
+    src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
+    width="280"
+    alt="Railway logo"
+  />
+</a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/start/framework/solid/guide/hosting.md` around lines 200 - 206, Replace
the <picture> block that uses prefers-color-scheme with the same dual-<img>
pattern used in the React guide: remove the <picture> element and render two
<img> elements (one for dark, one for light) that match the Solid guide
filenames; ensure you reference the Solid-specific assets ("railway-dark.svg"
and "railway-light.svg") for src/srcset and set appropriate alt/width attributes
so the Railway logo display is consistent with the React hosting guide.
docs/start/framework/react/guide/hosting.md (1)

205-211: Consider updating Railway logo for consistency.

The Railway section still uses the <picture> element with prefers-color-scheme, which means it responds only to system theme preference, not the site's theme toggle. For consistency with the Cloudflare and Netlify sections (and to fully address the pattern that caused issue #693), consider updating this to use the same dual <img> approach.

♻️ Suggested update for consistency
-<a href="https://railway.com?utm_source=tanstack" alt="Railway Logo">
-  <picture>
-    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-white.svg" width="280">
-    <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-black.svg" width="280">
-    <img alt="Railway logo" src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg" width="280">
-  </picture>
-</a>
+<a href="https://railway.com?utm_source=tanstack">
+  <img
+    class="block dark:hidden"
+    src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-black.svg"
+    width="280"
+    alt="Railway logo"
+  />
+  <img
+    class="hidden dark:block"
+    src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-white.svg"
+    width="280"
+    alt="Railway logo"
+  />
+</a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/start/framework/react/guide/hosting.md` around lines 205 - 211, Replace
the <picture> element in the Railway anchor with the same dual-<img> pattern
used for Cloudflare/Netlify so the site theme toggle (not just
prefers-color-scheme) controls which logo shows; remove the <picture>/<source>
tags and add two <img> elements pointing to the dark and light SVGs
(railway-white.svg / railway-black.svg or railway-light.svg), preserve the alt
text ("Railway logo") and width, and apply the same CSS visibility
classes/utility names used elsewhere so the site theme toggle hides/shows the
correct image.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/start/framework/react/guide/hosting.md`:
- Line 126: The anchor tag linking to Netlify ("<a
href=\"https://www.netlify.com?utm_source=tanstack\" alt=\"Netlify Logo\">")
contains an invalid alt attribute; remove the alt attribute from this <a>
element so the tag becomes a valid anchor without alt (matching the Cloudflare
section's correction).

In `@docs/start/framework/solid/guide/hosting.md`:
- Line 121: Remove the invalid alt attribute from the anchor element currently
written as <a href="https://www.netlify.com?utm_source=tanstack" alt="Netlify
Logo">; update the tag to <a href="https://www.netlify.com?utm_source=tanstack">
and, if there is an <img> inside that anchor, ensure that <img> has an
appropriate alt attribute (e.g., alt="Netlify Logo") so accessibility is
preserved.
- Line 48: Remove the stray test text "testing updats" (the accidental test
content) from the documentation — delete that line/entry where it appears,
ensure the surrounding Markdown remains valid (no leftover blank lines or broken
formatting), and preview/build the docs to confirm no other test artifacts
remain.

---

Nitpick comments:
In `@docs/start/framework/react/guide/hosting.md`:
- Around line 205-211: Replace the <picture> element in the Railway anchor with
the same dual-<img> pattern used for Cloudflare/Netlify so the site theme toggle
(not just prefers-color-scheme) controls which logo shows; remove the
<picture>/<source> tags and add two <img> elements pointing to the dark and
light SVGs (railway-white.svg / railway-black.svg or railway-light.svg),
preserve the alt text ("Railway logo") and width, and apply the same CSS
visibility classes/utility names used elsewhere so the site theme toggle
hides/shows the correct image.

In `@docs/start/framework/solid/guide/hosting.md`:
- Around line 200-206: Replace the <picture> block that uses
prefers-color-scheme with the same dual-<img> pattern used in the React guide:
remove the <picture> element and render two <img> elements (one for dark, one
for light) that match the Solid guide filenames; ensure you reference the
Solid-specific assets ("railway-dark.svg" and "railway-light.svg") for
src/srcset and set appropriate alt/width attributes so the Railway logo display
is consistent with the React hosting guide.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 953b0822-5c1d-4f51-8c46-910010ac0e55

📥 Commits

Reviewing files that changed from the base of the PR and between 5a81726 and 82c1ede.

📒 Files selected for processing (2)
  • docs/start/framework/react/guide/hosting.md
  • docs/start/framework/solid/guide/hosting.md

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/start/framework/solid/guide/hosting.md (1)

48-48: ⚠️ Potential issue | 🟡 Minor

Remove accidental test text from docs content.

testing updats appears to be stray text and should be removed.

🧹 Suggested fix
-testing updats
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/start/framework/solid/guide/hosting.md` at line 48, Remove the
accidental stray text "testing updats" from the documentation content in the
Solid hosting guide; locate the line containing that exact phrase in the guide
(the stray diff entry "testing updats") and delete it so the docs contain only
intended content.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/start/framework/react/guide/hosting.md`:
- Around line 205-215: The light-mode Railway logo img tag has the image URL
mistakenly placed in the class attribute; update the first <img> element so the
image URL is moved from the class attribute into the src attribute (i.e.,
replace the class="https://raw.githubusercontent.com/.../railway-light.svg" with
a proper src="..."), leaving any intended class names separate, and verify the
second <img> (hidden dark:block) already uses src correctly.

In `@docs/start/framework/solid/guide/hosting.md`:
- Around line 200-210: The first <img> tag in the snippet has the light-mode
logo URL mistakenly placed in the class attribute instead of src; update that
first <img> element (the one with
class="https://raw.githubusercontent.com/.../railway-light.svg") to put the logo
URL into the src attribute and use a proper class value (or remove class) so the
image renders; ensure the alt text remains and any width attribute is added if
needed to match the second <img>.

---

Duplicate comments:
In `@docs/start/framework/solid/guide/hosting.md`:
- Line 48: Remove the accidental stray text "testing updats" from the
documentation content in the Solid hosting guide; locate the line containing
that exact phrase in the guide (the stray diff entry "testing updats") and
delete it so the docs contain only intended content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 443c6c6c-8fe6-4539-91f4-454de8137e1d

📥 Commits

Reviewing files that changed from the base of the PR and between 82c1ede and 89e4ba6.

📒 Files selected for processing (2)
  • docs/start/framework/react/guide/hosting.md
  • docs/start/framework/solid/guide/hosting.md

Comment on lines +205 to +215
<a href="https://railway.com?utm_source=tanstack">
<img
class="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
alt="Railway logo"
/>
<img
class="hidden dark:block"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
width="280"
alt="Railway logo"
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Railway light-mode image is broken due to missing src.

At Line 207, the image URL is assigned to class instead of src, so the light logo will not render.

🔧 Suggested fix
 <a href="https://railway.com?utm_source=tanstack">
   <img
-    class="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
+    class="block dark:hidden"
+    src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
+    width="280"
     alt="Railway logo"
   />
   <img
     class="hidden dark:block"
     src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<a href="https://railway.com?utm_source=tanstack">
<img
class="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
alt="Railway logo"
/>
<img
class="hidden dark:block"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
width="280"
alt="Railway logo"
/>
<a href="https://railway.com?utm_source=tanstack">
<img
class="block dark:hidden"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
width="280"
alt="Railway logo"
/>
<img
class="hidden dark:block"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
width="280"
alt="Railway logo"
/>
</a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/start/framework/react/guide/hosting.md` around lines 205 - 215, The
light-mode Railway logo img tag has the image URL mistakenly placed in the class
attribute; update the first <img> element so the image URL is moved from the
class attribute into the src attribute (i.e., replace the
class="https://raw.githubusercontent.com/.../railway-light.svg" with a proper
src="..."), leaving any intended class names separate, and verify the second
<img> (hidden dark:block) already uses src correctly.

Comment on lines +200 to +210
<a href="https://railway.com?utm_source=tanstack">
<img
class="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
alt="Railway logo"
/>
<img
class="hidden dark:block"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
width="280"
alt="Railway logo"
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Railway light-mode logo won’t render (URL placed in class).

At Line 202, the light logo URL is in class instead of src, so the first image is broken.

🔧 Suggested fix
 <a href="https://railway.com?utm_source=tanstack">
   <img
-    class="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
+    class="block dark:hidden"
+    src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
+    width="280"
     alt="Railway logo"
   />
   <img
     class="hidden dark:block"
     src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<a href="https://railway.com?utm_source=tanstack">
<img
class="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
alt="Railway logo"
/>
<img
class="hidden dark:block"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
width="280"
alt="Railway logo"
/>
<a href="https://railway.com?utm_source=tanstack">
<img
class="block dark:hidden"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
width="280"
alt="Railway logo"
/>
<img
class="hidden dark:block"
src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
width="280"
alt="Railway logo"
/>
</a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/start/framework/solid/guide/hosting.md` around lines 200 - 210, The
first <img> tag in the snippet has the light-mode logo URL mistakenly placed in
the class attribute instead of src; update that first <img> element (the one
with class="https://raw.githubusercontent.com/.../railway-light.svg") to put the
logo URL into the src attribute and use a proper class value (or remove class)
so the image renders; ensure the alt text remains and any width attribute is
added if needed to match the second <img>.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
docs/start/framework/solid/guide/hosting.md (1)

199-210: ⚠️ Potential issue | 🔴 Critical

Fix the Railway light-mode logo markup.

The first <img> element has the URL incorrectly placed in the class attribute instead of src, and is missing the src, width, and proper visibility class attributes. This prevents the logo from rendering in light mode.

🔧 Proposed fix
 <a href="https://railway.com?utm_source=tanstack">
   <img
-    class="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
+    class="block dark:hidden"
+    src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-light.svg"
+    width="280"
     alt="Railway logo"
   />
   <img
     class="hidden dark:block"
     src="https://raw.githubusercontent.com/tanstack/tanstack.com/main/src/images/railway-dark.svg"
     width="280"
     alt="Railway logo"
   />
 </a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/start/framework/solid/guide/hosting.md` around lines 199 - 210, The
light-mode Railway logo <img> element has the image URL incorrectly in the class
attribute and is missing src, width, and visibility classes; update the first
<img> (the light-mode logo) by moving the URL from the class attribute into src,
add width="280" and set the visibility classes (e.g., class="block dark:hidden")
so it mirrors the dark-mode image's behavior, and keep the alt text intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/start/framework/solid/guide/hosting.md`:
- Around line 199-210: The light-mode Railway logo <img> element has the image
URL incorrectly in the class attribute and is missing src, width, and visibility
classes; update the first <img> (the light-mode logo) by moving the URL from the
class attribute into src, add width="280" and set the visibility classes (e.g.,
class="block dark:hidden") so it mirrors the dark-mode image's behavior, and
keep the alt text intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 77f559d2-299b-4244-9612-9e01fcf2c883

📥 Commits

Reviewing files that changed from the base of the PR and between 89e4ba6 and 809a2dc.

📒 Files selected for processing (1)
  • docs/start/framework/solid/guide/hosting.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare & Netlify logos not visible in light mode

1 participant