[Webkit-unassigned] [Bug 155704] New: Feature request: Animating max-height / height based on content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 20 11:24:10 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=155704

            Bug ID: 155704
           Summary: Feature request: Animating max-height / height based
                    on content
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: craig+webkit at craigfrancis.co.uk

When creating a disclosure widget:

    <p><a href="#widget">Show Terms &amp; Conditions</a></p>
    <div id="widget">
        <p>Long legal text, hidden by default.</p>
    </div>

Developers used to use jQuery to display the hidden content with a height changing animation (so the content did not suddenly appear):

    $('#widget').slideToggle();

More recently we have been using CSS animations:

    #widget {
        overflow-y: hidden;
        max-height: 500px; /* approximate max height */
        transition-property: all;
        transition-duration: .5s;
    }

    #widget.closed {
        max-height: 0;
    }

    https://davidwalsh.name/css-slide

Where `max-height` has to be guessed (not too high, as the animation will be too fast, and not too small, as content will be unreadable).

So can we take the `max-content` suggestion for the auto-resizing iframe, and allow it to work on the `max-height` or `height` properties:

    #widget {
        max-height: max-content;
    }

-----

This is related to the iframe and textarea resize requests:

https://bugs.webkit.org/show_bug.cgi?id=153952
https://bugs.webkit.org/show_bug.cgi?id=155703
https://github.com/craigfrancis/iframe-height

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160320/4c1ff33a/attachment.html>


More information about the webkit-unassigned mailing list