contain-size-button-001.html (793B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Containment Test: Size containment on button</title> 4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size"> 6 <link rel="match" href="reference/contain-size-button-001-ref.html"> 7 <meta name=assert content="Size containment does apply to buttons, thus their size is the same than if they don't have contents."> 8 <style> 9 button { 10 border: 5px solid green; 11 padding: 0; 12 margin: 0; 13 contain: size; 14 color: transparent; 15 font-size: 2em; 16 } 17 </style> 18 19 <p>This test passes if it has the same output as the reference. You see the word "before", a 10px green square at the top, and then the word "after".</p> 20 before<button>flex</button>after