tor-browser

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

overflow-wrap-min-content-size-004.html (1347B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Text Test: overflow-wrap: anywhere and intrinsic sizing</title>
      4 <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
      5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
      6 <meta name="flags" content="ahem">
      7 <link rel="match" href="reference/overflow-wrap-min-content-size-004-ref.html">
      8 <meta name="assert" content="Soft wrap opportunities introduced by overflow-wrap:break-word **are not** considered when calculating min-content intrinsic sizes.">
      9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
     10 <style>
     11 table {
     12  font: 20px/1 Ahem;
     13  overflow-wrap: break-word;
     14  max-width: 0;
     15  border: 0;
     16  border-collapse: collapse;
     17 }
     18 td {
     19  padding: 0;
     20  background: green;
     21  color: transparent;
     22 }
     23 #red {
     24  font: 20px/1 Ahem;
     25  position: absolute;
     26  z-index: -1;
     27  background: red;
     28  color: transparent;
     29 }
     30 </style>
     31 
     32 <p>Test passes if there is a green box below and no red.
     33 <div id=red>XXXX</div>
     34 <table><tr><td>XXXX</table>
     35 
     36 <!--
     37  width:min-content on the div directly without using a table
     38  would achieve the goal of this test, and be a lot simpler.
     39 
     40  However, width:min-content is not yet widely supported.
     41 
     42  Using a table, and forcing it to be as small as possible
     43  will achieve min-content sizing of the div in all browsers.
     44 -->