legend-padding-1-ref.html (1032B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Reference for bug 1483499</title> 5 <style> 6 legend, .legendRef { 7 /* Here in the reference case, we explicitly specify padding, and we also 8 use a custom-styled div as the reference case for any legend element 9 that is not directly snapped into a fieldset border. */ 10 background: yellow; 11 border: 1px solid brown; 12 padding: 0px 2px; 13 } 14 </style> 15 </head> 16 <body> 17 <!-- Test: legend default styling shouldn't be affected 18 by presence of a display:contents wrapper: --> 19 <fieldset> 20 <legend>DisplayContentsWrapper</legend> 21 </fieldset> 22 <br> 23 24 <!-- Test: legend should get the same 2px of inline-axis padding, even 25 if it's not inside of a fieldset at all. --> 26 <div class="legendRef">JustALegend</div> 27 <br> 28 29 <div class="legendRef"> 30 <div class="legendRef">NestedLegend</div> 31 </div> 32 <br> 33 34 <fieldset> 35 <legend> 36 <div class="legendRef"> 37 <div class="legendRef">NestedLegendInFieldset</div> 38 </div> 39 </legend> 40 </fieldset> 41 42 </body> 43 </html>