Skip to content

fix(docs): Improve fit-content and other sizing keyword pages #40202

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dipikabh
Copy link
Contributor

@dipikabh dipikabh commented Jul 4, 2025

Description

A user on Discord reported that the description for fit-content was misleading and unclear.

I also found that the reference to fit-content(stretch) is outdated and should be removed.
From CSS Box Sizing Level 3 spec:
> Note: This section previously defined stretch and fit-content as keywords representing the stretch-fit size and fit-content size, respectively. These keywords have been deferred to Level 4 (along with an additional contain keyword that behaves similarly to stretch but preserves the preferred aspect ratio, if any) to better work out the implications in situations with indefinite available space.

Updates in this PR

  • Improved and clarified the description of fit-content.
    • Removed the outdated reference to fit-content(stretch). Updated the note.
    • Moved the formula to the "Description" section.
  • Made the language and structure more consistent across other related sizing keyword pages: max-content and min-content.
  • Made light edits to the related glossary page for Intrinsic size.
    • Converted the subsection on "Extrinsic size" into a new glossary entry.

Motivation

To ensure content is accurate, up-to-date, and easier to understand

@dipikabh dipikabh requested review from a team as code owners July 4, 2025 04:01
@dipikabh dipikabh requested review from estelle and pepelsbey and removed request for a team July 4, 2025 04:01
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:Glossary Glossary entries size/m [PR only] 51-500 LoC changed labels Jul 4, 2025
Copy link
Contributor

github-actions bot commented Jul 4, 2025

Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Jul 11, 2025
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 Content:Glossary Glossary entries merge conflicts 🚧 [PR only] size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants