legend-padding-1.html (833B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Testcase for bug 1483499</title> 5 <style> 6 legend { 7 background: yellow; 8 border: 1px solid brown; 9 } 10 </style> 11 </head> 12 <body> 13 <!-- Test: legend default styling shouldn't be affected 14 by presence of a display:contents wrapper: --> 15 <fieldset> 16 <div style="display: contents"> 17 <legend>DisplayContentsWrapper</legend> 18 </div> 19 </fieldset> 20 <br> 21 22 <!-- Test: legend should get the same 2px of inline-axis padding, even 23 if it's not inside of a fieldset at all. --> 24 <legend>JustALegend</legend> 25 <br> 26 27 <!-- ...and if it's nested, each nesting level will add 2px of padding. --> 28 <legend> 29 <legend>NestedLegend</legend> 30 </legend> 31 <br> 32 33 <fieldset> 34 <legend> 35 <legend> 36 <legend>NestedLegendInFieldset</legend> 37 </legend> 38 </legend> 39 </fieldset> 40 41 </body> 42 </html>