-
Notifications
You must be signed in to change notification settings - Fork 673
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] how should inline-axis intrinsic sizing work for 'fit-content' and 'fit-content()'? #3731
Comments
Sorry, I missed this. So the idea of |
Proposed edits: @@ -444,6 +444,11 @@ Sizing Values: the <<length-percentage>>, ''width/auto'' | ''max-width/none'', '
i.e.
<code>min(''width/max-content'', max(''width/min-content'', <<length-percentage>>))</code>;
otherwise behaves as the property’s <a>initial value</a>.
+ For the purpose of calculating <a>min-content contributions</a>,
+ behaves as ''min-content'';
+ for <a>max-content contributions</a>,
+ as ''max-content''--
+ clamped, if the argument is a <<length>>, by that length.
Negative values are invalid.
</dl> [css-sizing-4 is an experimental mess, hence the DO NOT IMPLEMENT warning; working against css-sizing-3] |
I don't think that edit's handling of values that have no I'm still unsure about whether it's really a good solution for values that do have a |
Um, good point. :) Updated text:
I'm open to suggestions, but in the absence of a clear benefit for another behavior, I think consistency with |
OK, I guess, except that that needs slight rewording to account for |
@dbaron reviews are the best reviews. :) Tentatively checked in. |
Why not rely on https://drafts.csswg.org/css-sizing-3/#percentage-sizing ? Like if you have For If I have an element with IMO |
The CSS Working Group just discussed The full IRC log of that discussion<AmeliaBR> Topic: how should inline-axis intrinsic sizing work for 'fit-content' and 'fit-content()'?<AmeliaBR> github: https://github.com//issues/3731 <AmeliaBR> Rossen_: The topic was introduced by David. He sent regrets. Who can talk? <AmeliaBR> fantasai: Oriol posted new comments on GitHub. I can introduce, but want to follow offline. <AmeliaBR> … Issue is when argument is a percentage, that depends on the container. Cyclic resolution. <AmeliaBR> … One option is to ignore components with percentage. Other is to treat as zero, same as in other places. <fantasai> s/zero/zero or auto/ <AmeliaBR> … I will probably pick the second & integrate in spec. Let me know in the issue if you have concerns. <AmeliaBR> Rossen_: I'm inclined to agree with being consistent with how percentages behave elsewhere. |
The CSS Working Group just discussed The full IRC log of that discussion<dael> Topic: how should inline-axis intrinsic sizing work for 'fit-content' and 'fit-content()'?<dael> github: https://github.com//issues/3731 <dael> fantasai: I haven't drawn up proposed edits. That needs to be done. <dael> fantasai: Unless someone has comments on general direction of edits we can come back once there's spec text <dael> Rossen_: Remove from agenda for now? <dael> fantasai: That's what I'm thinking unless there's something to add. <dael> Rossen_: It had been on the agenda for a few weeks. We can put it back to github only <dael> fantasai: Seems like in last discussion we were going toward oriol proposal <dael> fantasai: What I would do is edit that in. If anyone disagrees with that direction we can talk about that. <dael> fantasai: Otherwise I'll try to edit that in and see where we get. <dael> Rossen_: Reasonable |
…fer to normal % behavior, as suggested by Oriol in #3731.
We simplified to just rely on the behavior of the plain argument, as Oriol suggested. That is, Agenda+ to confirm that this resolves dbaron's and Oriol's concerns. |
Where did the text that defines this actually end up? I'm having trouble finding it. |
The CSS Working Group just discussed Inline-axis intrinsic sizing for fit-content(%). |
That commit appears to remove the definition of how intrinsic sizes are handled. It's not clear to me what definition then takes over -- I couldn't find anything relevant in the spec. |
Ends up referring to whatever the relevant layout module says about lengths and percentages, but also https://drafts.csswg.org/css-sizing-3/#intrinsic |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-sizing] how should inline-axis intrinsic sizing work for 'fit-content' and 'fit-content()'?<dael> github: https://github.com//issues/3731 <dael> fantasai: I believe the issue is solved. I'm looking for confirmation we're okay. Seemed there was some confusion but I answered the question. oriol looked and thought it was fine I think. I'd like to close the issue at some point. I don't believe further edits are necessary <dael> astearns: dbaron isn't on. We could close and if there is anything additional he can re-open with a comment <dael> astearns: Any objection to close this as fixed? <dael> astearns: And keep commentor response pending tag on it <dael> RESOLVED: Close this issue as fixed |
We simplified to just rely on the behavior of the plain argument. That is, width: fit-content(50%) behaves the same as width: 50%; in all circumstances, just clamped by min/max-content. Note: for block axis, we treat fit-content() as initial value its minimal and maximal value are identical and equal to the initial value in block axis. From: w3c/csswg-drafts#3731 (comment) Note: this patch doesn't include any update on flex and grid layout. We may have to come back to check it. Differential Revision: https://phabricator.services.mozilla.com/D113199 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1312588 gecko-commit: 41792e6152e6b5e8ad472e6cc21ce07352447bb8 gecko-reviewers: TYLin, emilio
…it-content(). r=TYLin,emilio We simplified to just rely on the behavior of the plain argument. That is, width: fit-content(50%) behaves the same as width: 50%; in all circumstances, just clamped by min/max-content. Note: for block axis, we treat fit-content() as initial value its minimal and maximal value are identical and equal to the initial value in block axis. From: w3c/csswg-drafts#3731 (comment) Note: this patch doesn't include any update on flex and grid layout. We may have to come back to check it. Differential Revision: https://phabricator.services.mozilla.com/D113199
We simplified to just rely on the behavior of the plain argument. That is, width: fit-content(50%) behaves the same as width: 50%; in all circumstances, just clamped by min/max-content. Note: for block axis, we treat fit-content() as initial value its minimal and maximal value are identical and equal to the initial value in block axis. From: w3c/csswg-drafts#3731 (comment) Note: this patch doesn't include any update on flex and grid layout. We may have to come back to check it. Differential Revision: https://phabricator.services.mozilla.com/D113199 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1312588 gecko-commit: 41792e6152e6b5e8ad472e6cc21ce07352447bb8 gecko-reviewers: TYLin, emilio
…it-content(). r=TYLin,emilio We simplified to just rely on the behavior of the plain argument. That is, width: fit-content(50%) behaves the same as width: 50%; in all circumstances, just clamped by min/max-content. Note: for block axis, we treat fit-content() as initial value its minimal and maximal value are identical and equal to the initial value in block axis. From: w3c/csswg-drafts#3731 (comment) Note: this patch doesn't include any update on flex and grid layout. We may have to come back to check it. Differential Revision: https://phabricator.services.mozilla.com/D113199
This issue is probably blocking implementation of the
fit-content()
function (which is in css-sizing-3) in Gecko, based on a bug comment I wrote a few months ago. I realize I never filed an issue here about it, though, so I'm doing so now.The css-sizing-4 spec's definition of intrinsic sizes doesn't say how intrinsic sizing should treat the
fit-content()
function. It also defines a behavior for thefit-content
keyword that I'm not convinced makes sense.What I wrote in the above bugzilla comment about how I think things ought to behave was the following:
So, in other words, I think it's easy to specify the inline-axis intrinsic size behavior for
fit-content(<length>)
although the spec doesn't do so today. It would just need to be added to the clause that now says:I think it's harder to specify the behavior for
fit-content(<percentage>)
(which the spec doesn't specify today) or forfit-content
(which the spec currently says is the same asauto
orstretch
... but it's not clear to me that that's a good behavior).The text was updated successfully, but these errors were encountered: