Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <!-- |
michael@0 | 3 | Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 5 | --> |
michael@0 | 6 | <!-- This test verifies that we honor percent widths on content inside of |
michael@0 | 7 | a <button> element (resolving the percent against the <button>). |
michael@0 | 8 | (In this testcase, the button has some focus-border/padding, which |
michael@0 | 9 | occupies part of the button's content-box and which we'll have to |
michael@0 | 10 | subtract out from the button's size before using it to resolve |
michael@0 | 11 | percentages sizes.) --> |
michael@0 | 12 | <html> |
michael@0 | 13 | <head> |
michael@0 | 14 | <style> |
michael@0 | 15 | button { |
michael@0 | 16 | border: 0; |
michael@0 | 17 | padding: 0; |
michael@0 | 18 | |
michael@0 | 19 | font: 10px sans-serif; |
michael@0 | 20 | vertical-align: top; |
michael@0 | 21 | |
michael@0 | 22 | color: black; |
michael@0 | 23 | background: gray; |
michael@0 | 24 | -moz-appearance: none; |
michael@0 | 25 | } |
michael@0 | 26 | button::-moz-focus-inner { |
michael@0 | 27 | padding: 0 6px 0 2px; |
michael@0 | 28 | border: 1px dotted transparent; |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | div.p80 { |
michael@0 | 32 | width: 80%; |
michael@0 | 33 | background: pink; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | div.p100 { |
michael@0 | 37 | width: 100%; |
michael@0 | 38 | background: yellow; |
michael@0 | 39 | } |
michael@0 | 40 | </style> |
michael@0 | 41 | </head> |
michael@0 | 42 | <body> |
michael@0 | 43 | <!--Button has explicit width for us to resolve against: --> |
michael@0 | 44 | <button style="width: 110px"> |
michael@0 | 45 | <div class="p80">abc</div> |
michael@0 | 46 | </button> |
michael@0 | 47 | |
michael@0 | 48 | <button style="width: 110px"> |
michael@0 | 49 | <div class="p100">abc</div> |
michael@0 | 50 | </button> |
michael@0 | 51 | |
michael@0 | 52 | <!--Button is using intrinsic width: --> |
michael@0 | 53 | <button> |
michael@0 | 54 | <div class="p80">abc</div> |
michael@0 | 55 | </button> |
michael@0 | 56 | |
michael@0 | 57 | <button> |
michael@0 | 58 | <div class="p100">abc</div> |
michael@0 | 59 | </button> |
michael@0 | 60 | |
michael@0 | 61 | </body> |
michael@0 | 62 | </html> |