Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New CSS guide: Understanding aspect ratio #33461

Merged
merged 26 commits into from
May 15, 2024
Merged

New CSS guide: Understanding aspect ratio #33461

merged 26 commits into from
May 15, 2024

Conversation

estelle
Copy link
Member

@estelle estelle commented May 7, 2024

links to this new guide will be created in a separate PR.

(I've been having issues with git, so this is the 3rd attempt at this PR. Sorry for the spam)

Note the images are not loading in the preview. The iframes for the preview are on https://live.mdnyalp.dev/en-US/docs/Web/CSS/CSS_box_sizing/Understanding_aspect-ratio/runner.html?id=original but the image is on https://pr33461.content.dev.mdn.mozit.cloud/en-US/docs/Web/CSS/CSS_box_sizing/Understanding_aspect-ratio

Fixes openwebdocs/project#201

@estelle estelle requested a review from a team as a code owner May 7, 2024 07:18
@estelle estelle requested review from bsmth and removed request for a team May 7, 2024 07:18
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/m 51-500 LoC changed labels May 7, 2024
Copy link
Contributor

github-actions bot commented May 7, 2024

Preview URLs

(comment last updated: 2024-05-15 22:29:33)

@github-actions github-actions bot added size/l 501-1000 LoC changed and removed size/m 51-500 LoC changed labels May 7, 2024
dipikabh

This comment was marked as resolved.

@chrisdavidmills chrisdavidmills removed their request for review May 8, 2024 07:19
@estelle estelle requested a review from dipikabh May 8, 2024 08:32
dipikabh

This comment was marked as outdated.

@estelle
Copy link
Member Author

estelle commented May 9, 2024

Thanks for the review @dipikabh

Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Review of the remaining sections

@estelle estelle requested a review from dipikabh May 13, 2024 05:57
@bsmth bsmth removed their request for review May 13, 2024 12:24
@estelle
Copy link
Member Author

estelle commented May 13, 2024

@dipikabh Thanks for the review. Looks like we're close to there.

Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, @estelle. A few last things..


### Creating a circle based on the container size

The inline-size of non-replaced block-level elements is the size of their container's [content box](/en-US/docs/Web/CSS/box-edge#content-box). Because they have an size by default, they don't need to have an explicit size set for the `aspect-ratio` property to work.
Copy link
Contributor

Choose a reason for hiding this comment

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

"an size" in "Because they have an size by default" remains to be fixed


## See also

- [CSS box sizing](/en-US/docs/Web/CSS/CSS_box_sizing) module
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add this link https://developer.mozilla.org/en-US/docs/Learn/Performance/Multimedia#rendering_strategy_preventing_jank_when_loading_images here as "How to prevent jank when loading images" (it is currently only linked via the term "jank" on the page)

Copy link
Member Author

Choose a reason for hiding this comment

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

It's only tangential, so i think that reference is enough. I'll be adding CLS content in a few weeks, so will link that instead when it's published.

Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
@estelle estelle requested a review from dipikabh May 14, 2024 21:00
Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback, @estelle. Approving!
There's a lint error, feel free to merge after resolving it.

…index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@estelle estelle merged commit d532243 into mdn:main May 15, 2024
8 checks passed
@estelle estelle deleted the rg3 branch May 30, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs size/l 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aspect Ratio
2 participants