Skip to content

Conversation

cscnk52
Copy link
Contributor

@cscnk52 cscnk52 commented Oct 3, 2025

This PR fix <picture> element not follow colorPreference, see my crate simpleicons-rs, it has a element in front of README, and I prepare two color pictures for it:

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/cscnk52/simpleicons-rs/raw/refs/heads/main/assets/img/simpleicons-rs-banner-dark.png" />
  <source media="(prefers-color-scheme: light)" srcset="https://github.com/cscnk52/simpleicons-rs/raw/refs/heads/main/assets/img/simpleicons-rs-banner-light.png" />
  <img alt="simpleicons-rs banner" src="https://github.com/cscnk52/simpleicons-rs/raw/refs/heads/main/assets/img/simpleicons-rs-banner-light.png" />
</picture>

It should follow crates.io theme to change, but not.

After attach debug to it, I found just wrong order of colorPreference and input, just swap them to fix.

image

After fix, it looks good.

PixPin_2025-10-03_12-52-40

Related to a216b9f#diff-e24e30bcf8defc9f1a68733bae25f89198502daa94e3a20ae0dc4d5a8f971a3fL9-R9

@Turbo87 Turbo87 added the C-bug 🐞 Category: unintended, undesired behavior label Oct 4, 2025
@Turbo87
Copy link
Member

Turbo87 commented Oct 4, 2025

huh, looks like this broke during #11734 :-/

thanks for the fix! :)

@Turbo87 Turbo87 enabled auto-merge (squash) October 4, 2025 16:24
@Turbo87 Turbo87 merged commit 500c61c into rust-lang:main Oct 4, 2025
10 of 11 checks passed
@cscnk52 cscnk52 deleted the fix-picture branch October 5, 2025 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants