tor-browser

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

block-container-block-end-last-child-with-border.html (1494B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-block">
      6 <meta name="assert" content="border should protect the margins inside a nested block from trimming">
      7 <style>
      8 .trim {
      9    margin-trim: block;
     10 }
     11 container {
     12    display: block;
     13    width: min-content;
     14    outline: 1px solid blue;
     15 }
     16 item {
     17    display: block;
     18    inline-size: 50px;
     19    block-size: 25px;
     20 }
     21 .collapsed {
     22    block-size: 0px;
     23    margin-block: 14px;
     24 }
     25 .border {
     26    block-size: auto;
     27    border: 1px solid black;
     28    background-color: green;
     29    margin-block-end: 20px;
     30 }
     31 </style>
     32 <script src="/resources/testharness.js"></script>
     33 <script src="/resources/testharnessreport.js"></script>
     34 <script src="/resources/check-layout-th.js"></script>
     35 </head>
     36 <body onload="checkLayout('.collapsed')">
     37    <div id="target">
     38        <container class="trim">
     39            <!-- Since this item has a border, the margins inside cannot collapse through
     40                 and should not be trimmed. However, its block-end border that was set
     41                 from the style should be trimmed. -->
     42            <item class="border">
     43                <item style="margin-block: 10px;"></item>
     44                <item data-offset-y="58" class="collapsed"></item>
     45            </item>
     46            <item data-offset-y="59" class="collapsed" style="margin-block: 5px 8px;"></item>
     47        </container>
     48    </div>
     49 </body>
     50 </html>