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) and (h > max-height) |
michael@0 | 19 | * |
michael@0 | 20 | * w wmin |
michael@0 | 21 | * |-------------------------+-----+----------> width |
michael@0 | 22 | * hmax h |
michael@0 | 23 | * |------------------+------+----------------> height |
michael@0 | 24 | * |
michael@0 | 25 | * target: [wmin, hmax] |
michael@0 | 26 | */ |
michael@0 | 27 | |
michael@0 | 28 | #img18 { min-width: 75px; /* 150% */ |
michael@0 | 29 | max-height: 75px; /* 75% */} |
michael@0 | 30 | |
michael@0 | 31 | </style> |
michael@0 | 32 | </head> |
michael@0 | 33 | <body> |
michael@0 | 34 | <p><img src="234686-18.gif" alt="" id="img18"></p> <!-- w=50 h=100 --> |
michael@0 | 35 | |
michael@0 | 36 | </body> |
michael@0 | 37 | </html> |