Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
michael@0 | 2 | <!-- |
michael@0 | 3 | From http://fantasai.inkedblade.net/style/specs/css2.1/tests/min-max-replaced |
michael@0 | 4 | with permission in |
michael@0 | 5 | https://bugzilla.mozilla.org/show_bug.cgi?id=413361#c11 |
michael@0 | 6 | --> |
michael@0 | 7 | <html lang="en"> |
michael@0 | 8 | <head> |
michael@0 | 9 | <title>CSS 2.1 Test Suite: Min/Max Height and Width Constraints on Replaced Elements</title> |
michael@0 | 10 | <link rel="author" title="fantasai" href="http://fantasai.inkedblade.net/" /> |
michael@0 | 11 | <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" /> |
michael@0 | 12 | <meta name="assert" content="However, for replaced elements with an intrinsic ratio and both 'width' and 'height' specified as 'auto', the algorithm is as follows:" /> |
michael@0 | 13 | <style type="text/css"> |
michael@0 | 14 | |
michael@0 | 15 | /* Diagrams are scaled so that w and h line up. |
michael@0 | 16 | Image is 75px x 75px; target dimensions will thus be 75px. */ |
michael@0 | 17 | |
michael@0 | 18 | /* w < min-width |
michael@0 | 19 | * wmin/w < hmax/h |
michael@0 | 20 | * |
michael@0 | 21 | * w wmin |
michael@0 | 22 | * |-------------+---------+------------------> width |
michael@0 | 23 | * h hmax |
michael@0 | 24 | * |-------------+----------------+-----------> height |
michael@0 | 25 | * |
michael@0 | 26 | * target: [wmin, wmin * h/w] |
michael@0 | 27 | */ |
michael@0 | 28 | |
michael@0 | 29 | #img4 {min-width: 75px; /* 300% */ |
michael@0 | 30 | max-height: 100px; /* 400% */} |
michael@0 | 31 | |
michael@0 | 32 | </style> |
michael@0 | 33 | </head> |
michael@0 | 34 | <body> |
michael@0 | 35 | <p><img src="234686-4.gif" alt="" id="img4"></p> <!-- w=25 h=25 --> |
michael@0 | 36 | |
michael@0 | 37 | </body> |
michael@0 | 38 | </html> |