Can't scroll to top of flex item that is overflowing container

后端 未结 7 2559
再見小時候
再見小時候 2020-11-21 05:08

So, in attempting to make a useful modal using flexbox, I found what seems to be a browser issue and am wondering if there is a known fix or workaround -- or ideas on how to

7条回答
  •  耶瑟儿~
    2020-11-21 05:36

    Well, as Murphy's Law would have it, the reading I did after posting this question resulted in a few results -- not completely resolved, but somewhat useful nonetheless.

    I played around with min-height a bit before posting, but was not aware of the intrinsic sizing constraints that are fairly new to the spec.

    http://caniuse.com/#feat=intrinsic-width

    Adding a min-height: min-content to the flexbox area does resolve the issue in Chrome, and with vendor prefixes also fixes Opera and Safari, though Firefox remains unresolved.

    min-height: -moz-min-content; // not implemented
    min-height: -webkit-min-content // works for opera and safari
    min-height: min-content // works for chrome
    

    Still looking for ideas on Firefox, and other potential solutions.

提交回复
热议问题