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

[css-sizing] Define a term like "uses fit-content inline sizing" (like floats) #3928

Closed
zcorpan opened this issue May 13, 2019 · 4 comments
Closed

Comments

@zcorpan
Copy link
Member

zcorpan commented May 13, 2019

For whatwg/html#4143 I tried to define that buttons size in the inline direction like floats do, i.e. "shink-to-fit" (CSS 2.2 terminology) or "shrink-wrap" (HTML used this terminology until I changed it in that PR now), if the inline-size is auto.

It seems reasonable to define a term that means exactly this, that can be used by floats, abspos, buttons, legends, and whatever else uses this behavior.

In IRC, @dbaron said

I think it would be reasonable to define the term as "uses fit-content inline sizing" or something like that. (It's also nice when the term matches a name in author-exposed syntax like fit-content.)

@zcorpan zcorpan added the css-sizing-3 Current Work label May 13, 2019
@fantasai
Copy link
Collaborator

fantasai commented May 15, 2019

I think you can just say that for a button that's a block or inline block, the used value of auto on the inline-size property is fit-content.

@fantasai fantasai reopened this May 15, 2019
@fantasai
Copy link
Collaborator

Or maybe, more accurately, “behaves as” fit-content. I'm guessing for Web-compat we can't actually set it that way in CSS. :)

@fantasai
Copy link
Collaborator

(Sorry, accidentally hit the close button earlier.)

@fantasai
Copy link
Collaborator

Oh! I just remembered that we added a term for handling cases like this: just say “In the inline axis, the automatic size is the fit-content size.” https://drafts.csswg.org/css-sizing-3/#automatic-size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants