Skip to content

Conversation

ksilix
Copy link

@ksilix ksilix commented Aug 30, 2025

Description

Fixed the example code based on below explanation (If the viewport is 600px wide or less, the slot size is 400px; otherwise, it is 800px.)

Motivation

Additional details

Related issues and pull requests

Fixed the example code based on below explanation (If the viewport is 600px wide or less, the slot size is 400px; otherwise, it is 800px.)
@ksilix ksilix requested a review from a team as a code owner August 30, 2025 20:51
@ksilix ksilix requested review from estelle and removed request for a team August 30, 2025 20:51
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs size/xs [PR only] 0-5 LoC changed labels Aug 30, 2025
@@ -118,7 +118,7 @@ For example:
<picture>
<source
srcset="small.jpg 480w, medium.jpg 800w, large.jpg 1200w"
sizes="(max-width: 600px) 400px, 600px"
sizes="(max-width: 600px) 400px, 800px"
Copy link
Member

@estelle estelle Sep 1, 2025

Choose a reason for hiding this comment

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

Thanks for catching and ediing the typo.

I think we should change line 129 instead. We wouldn't want an 800px wide img in a viewport that is less than 600px wide.

Copy link
Author

Choose a reason for hiding this comment

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

I think sizes="(max-width: 600px) 400px, 800px" tells if width <= 600px choose 400px and otherwise width > 600px choose 800px no?
Since we already have a value for 800w in srcset, changing 600px to 800px seems more easy to me

Copy link
Contributor

github-actions bot commented Sep 1, 2025

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/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants