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