- From: Craig Francis <craig.francis@gmail.com>
- Date: Sat, 20 Feb 2016 14:10:30 +0000
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Ojan Vafai <ojan@chromium.org>, Simon Fraser <smfr@me.com>, www-style list <www-style@w3.org>, Aleks Totic <atotic@google.com>, Elliott Sprehn <esprehn@google.com>, Ian Kilpatrick <ikilpatrick@google.com>
- Message-Id: <7334782C-CADD-4967-9DE4-64BB3412EF24@gmail.com>
Two other things worth thinking about for the spec... -------------------------------------------------- I don't think I'd be alone in saying I'd like this to also work on the <textarea>. textarea { height: max-content; } http://alistapart.com/article/expanding-text-areas-made-elegant <http://alistapart.com/article/expanding-text-areas-made-elegant> http://www.impressivewebs.com/textarea-auto-resize/ <http://www.impressivewebs.com/textarea-auto-resize/> http://stephanwagner.me/auto-resizing-textarea <http://stephanwagner.me/auto-resizing-textarea> http://github.com/thomasjo/jquery-autoresize <http://github.com/thomasjo/jquery-autoresize> https://github.com/javierjulio/textarea-autosize <https://github.com/javierjulio/textarea-autosize> -------------------------------------------------- And as an alternative to constant abusing of "max-height: 100000px" to animate the opening/closing of simple disclosure widgets: #widget { overflow-y: hidden; height: max-content; transition-property: all; transition-duration: .5s; } #widget.closed { height: 0; } https://davidwalsh.name/css-slide <https://davidwalsh.name/css-slide> https://jsfiddle.net/ProLoser/nurx8/ <https://jsfiddle.net/ProLoser/nurx8/> http://weblog.west-wind.com/posts/2014/Feb/22/Using-CSS-Transitions-to-SlideUp-and-SlideDown <http://weblog.west-wind.com/posts/2014/Feb/22/Using-CSS-Transitions-to-SlideUp-and-SlideDown> http://stackoverflow.com/questions/17301282/transitioning-between-open-close-in-details-element/17301828 <http://stackoverflow.com/questions/17301282/transitioning-between-open-close-in-details-element/17301828> -------------------------------------------------- > On 19 Feb 2016, at 07:32, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > > On Thu, Feb 18, 2016 at 9:01 PM, Ojan Vafai <ojan@chromium.org> wrote: >> If we do add ResizeObserver and it's ~5 lines of code to make this work, I'd >> be fine asking authors to do that. I'd also be fine with defining the >> max-content thing to work at ResizeObserver timing and implementing that. >> That actually avoids users seeing wrongly-sized iframes (because layout >> loops) and avoids the crash issues, but it means that offsetHeight on the >> iframe will sometimes give you a stale result. > > I'm fine with speccing that. A layout being observably stale is a new > thing for CSS, but it's fairly minor. > > What are your thoughts on the MQ stuff? > > ~TJ
Received on Saturday, 20 February 2016 14:11:01 UTC