Currently Firefox and Chrome don't agree on how to calculate the width of a float element.
https://issues.chromium.org/issues/41368104 ```html data:text/html;charset=UTF-8,<!DOCTYPE html> <div style="float:left; width:100px; height:100px; border:1px solid;">float</div> <div style="overflow:hidden; width:-webkit-fill-available; background:cyan;"> Should this go below the float, or beside it? </div> ``` 在2024年7月26日星期五 UTC+8 01:39:25<dhol...@mozilla.com> 写道: > Summary: This is a keyword for CSS sizing properties (e.g. 'width', > 'height') that allows elements to grow to exactly fill their containing > block's available space (similar to our existing supported '-moz-available' > keyword, though that moz-prefixed keyword only works in one axis for now, > while these keywords won't have that restriction) > Bugs: > https://bugzilla.mozilla.org/show_bug.cgi?id=1789477 for 'stretch' > https://bugzilla.mozilla.org/show_bug.cgi?id=1872755 for > '-webkit-fill-available' > Specification: https://drafts.csswg.org/css-sizing-4/#valdef-width-stretch > Standards Body: CSSWG > Platform coverage: All platforms > DevTools bug: N/A (as a new sizing keyword, this Just Works with existing > DevTools) > Link to standards-positions discussion: > https://github.com/mozilla/standards-positions/issues/1054 > Other browsers: > Blink: shipped the -webkit-fill-available keyword for this behavior > since ~forever, and they're working on the unprefixed "stretch" keyword as > well per > https://github.com/web-platform-tests/interop-2022-viewport/issues/18#issuecomment-1268722823 > WebKit: shipped the -webkit-fill-available keyword for this behavior > since ~forever. I'm not sure if/when they're planning to ship the > unprefixed "stretch" name. > > web-platform-tests: No substantial WPTs for "stretch" or > "-webkit-fill-available" exist yet, but I plan to add some WPTs before > enabling either of these keywords by default on any channel. > > > -- You received this message because you are subscribed to the Google Groups "dev-platform@mozilla.org" group. To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform+unsubscr...@mozilla.org. To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/e71ea8ee-42a5-4101-bd1b-57b17aa2ee48n%40mozilla.org.