[css-sizing-3] Content contribution of min-inline-size:fit-content and max-inline-size:fit-content · Issue #10721 · w3c/csswg-drafts (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@bfgeek

Description

@bfgeek

We came across this from a bug report submitted to us, and basically it comes down to these cases:

<!DOCTYPE html>
<div style="width: fit-content; border: solid 10px;">
  <div style="max-width: fit-content; width: 100000px;">
    abc def ehg
  </div>
</div>

https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=12976

<!DOCTYPE html>
<div style="width: fit-content; border: solid 10px;">
  <div style="min-width: fit-content; width: 10px;">
    abc def ehg
  </div>
</div>

https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=12977

Basically:

Gecko's behaviour here is reasonable (at least to me), but isn't in the spec (from my reading).
cc/ @tabatkins