tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

contain-layout-button-001.tentative.html (1089B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Containment Test: Layout 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-layout">
      6 <link rel="help" href="https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align">
      7 <link rel="match" href="reference/contain-layout-button-001-ref.html">
      8 <meta name=assert content="Layout containment does apply to buttons, but in an inline context their baseline is synthesized from their content-box.">
      9 <style>
     10 button {
     11  border: 5px solid green;
     12  padding: 0;
     13  /* We use a nonzero margin-bottom to be sure we're synthesizing a baseline
     14     from the margin-box rather than from the border-box: */
     15  margin-bottom: 2px;
     16  contain: layout;
     17  color: transparent;
     18  width: 0;
     19  height: 0;
     20 }
     21 </style>
     22 
     23 <p>This test passes if it has the same output as the reference. You see the word "before", a 10px green square aligned 2px above the text's baseline, and then the word "after".</p>
     24 before<button>b</button>after