-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
contain-intrinsic-size - improve docs #20912
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6d6f03f
contain-intrinsic-size - improve docs
hamishwillee 4add3e8
Update files/en-us/web/css/contain-intrinsic-size/index.md
hamishwillee d891ea1
Update files/en-us/web/css/contain-intrinsic-size/index.md
hamishwillee 734ca4d
Update files/en-us/web/css/contain-intrinsic-size/index.md
hamishwillee 1a0d105
Simplify language
hamishwillee b556ec8
Update files/en-us/web/css/contain-intrinsic-size/index.md
bsmth f8b214e
Update files/en-us/web/css/contain-intrinsic-size/index.md
bsmth e85b77f
Update files/en-us/web/css/contain-intrinsic-size/index.md
bsmth 3635b6e
Update files/en-us/web/css/contain-intrinsic-size/index.md
bsmth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @estelle , I find
auto
a little tricky. The theory is pretty simple - it saves the natural/rendered size of the element whenever it is outside of size containment and then uses that instead of the statedlength
when appropriate.What I don't get is why you would bother - the spec indicates this is only really used offscreen and will switch to using
length
for on-screen. I'm in discussion here w3c/csswg-drafts#7769 (comment) - might just be being stupid.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I get the auto thing now; it makes sense and this documentation is correct.
The
auto
option is mostly to get the benefits of size containment for offscreen elements without developers having to be too precise about the size of the element. It makes sense when you're skipping rendering the child elements. You don't have to worry about the fact that the length will be used when you're not skipping child elements because in this case as the element becomes visible you leave size containment and start rendering them.If you're on screen and deliberately getting the benefits of size containment then it is up to the developer to make sure that the size is properly calculated.