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

Intrinsic sizing keywords (min/max/fit-content) for width/height #751

Open
Tracked by #345
nicoburns opened this issue Dec 4, 2024 · 0 comments
Open
Tracked by #345

Intrinsic sizing keywords (min/max/fit-content) for width/height #751

nicoburns opened this issue Dec 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nicoburns
Copy link
Collaborator

nicoburns commented Dec 4, 2024

What problem does this solve or what need does it fill?

These keywords allow users to opt-in to sizing behaviour that Taffy already supports but can currently only be accessed implicitly or via grid-template sizing functions.

What solution would you like?

  • Add MinContent, MaxContent, and FitContent variants to Dimension.
  • Implement the sizing logic in the Flexbox, Grid, and Block layout algorithms by overriding the AvailableSpace provided to child nodes if their width/height is one of these keywords.
  • We will need to be careful that this will remove the invariant that available_space == parent_size

Additional context

A bunch of Flexbox WPT tests rely on these keywords, so if we want accurate test results then we need to implement them!

@nicoburns nicoburns added the enhancement New feature or request label Dec 4, 2024
@nicoburns nicoburns changed the title Support Intrinsic sizing keywords (min/max/fit-content) for width/height Intrinsic sizing keywords (min/max/fit-content) for width/height Dec 4, 2024
This was referenced Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant