Skip to content

Conversation

@AyaanB24
Copy link
Contributor

@AyaanB24 AyaanB24 commented Aug 27, 2025

Fixes #40902

Summary

Added clarification for the auto keyword and fallback values in the sizes attribute of the element. This ensures developers know how to maintain backward compatibility for browsers that do not support auto.

Problem

The existing MDN documentation did not mention:
How to specify fallback values when using auto.
The importance of ordering fallback values for older browsers.

What Changed

Updated the sizes attribute description.
Added note about backward compatibility.
Included an example from the HTML specification.

Before

image

After

image

@AyaanB24 AyaanB24 requested review from a team as code owners August 27, 2025 12:03
@AyaanB24 AyaanB24 requested review from chrisdavidmills and estelle and removed request for a team August 27, 2025 12:03
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:Performance Web performance docs size/s [PR only] 6-50 LoC changed labels Aug 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 27, 2025

Preview URLs

(comment last updated: 2025-08-28 10:30:59)

@github-actions github-actions bot removed the Content:Performance Web performance docs label Aug 27, 2025
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

@AyaanB24 thanks for another great contribution! I've got a few comments for you to consider.

chrisdavidmills and others added 2 commits August 28, 2025 11:26
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Awesome, this is looking good. Thanks again @AyaanB24!

@chrisdavidmills chrisdavidmills merged commit 493802c into mdn:main Aug 28, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more information about the <img sizes=auto> fallback strategy

3 participants