[Webkit-unassigned] [Bug 138094] New: width:-webkit-min-content ignores default image size

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 27 09:20:00 PDT 2014


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

            Bug ID: 138094
           Summary: width:-webkit-min-content ignores default image size
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Macintosh
                OS: Mac OS X 10.9
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: nickmanning214 at yahoo.com

If you have a figure like this:
<body>
<figure>
   <img src="http://www.placehold.it/400x400"><!--Note: The image size is 400x400-->
   <figcaption>lorem ipsum etc...</figcaption>
</figure>
</body>

With this CSS:
*{margin:0px;padding:0px}
figure{width:-webkit-min-content;width:-moz-min-content;}

everything works fine, but when you want to make it responsive (meaning, when the screen is under 400 pixels wide, the image shrinks accordingly), normally this would be done by applying max-width:100% to the image, but doing this causes -webkit-min-content to ignore the image's default size and shrink it to the longest word in the fig caption. -moz-min-content works as expected.

Here is an example:

http://jsfiddle.net/ywmsp0jy/3/

(compare with firefox's behavior)

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141027/767d4995/attachment-0002.html>


More information about the webkit-unassigned mailing list