tor-browser

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

flexbox-whitespace-handling-002.xhtml (2000B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <!--
      7     This test verifies that we preserve whitespace at the beginning & end of
      8     anonymous flex items (using "white-space: pre" so that it actually
      9     occupies space and affects the rendering).
     10 -->
     11 <html xmlns="http://www.w3.org/1999/xhtml">
     12  <head>
     13    <title>CSS Test: Test that whitespace is preserved at the edges of anonymous flex items if 'white-space: pre' is set</title>
     14    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
     15    <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-items"/>
     16    <link rel="match" href="flexbox-whitespace-handling-002-ref.xhtml"/>
     17    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"/>
     18    <style>
     19      div { height: 100px; }
     20      div.flexbox {
     21        white-space: pre;
     22        border: 1px dashed blue;
     23        width: 200px;
     24        display: flex;
     25        justify-content: space-around;
     26      }
     27      div.a {
     28        width: 30px;
     29        background: lightgreen;
     30      }
     31      div.b {
     32        width: 20px;
     33        background: lightblue;
     34      }
     35    </style>
     36  </head>
     37  <body>
     38    <!-- spaces around inline content at the beginning of flexbox -->
     39    <div class="flexbox">  abc<div class="a"/></div>
     40    <div class="flexbox">abc   <div class="a"/></div>
     41    <div class="flexbox">  abc   <div class="a"/></div>
     42 
     43    <!-- spaces around inline content at the end of flexbox -->
     44    <div class="flexbox"><div class="a"/>  abc</div>
     45    <div class="flexbox"><div class="a"/>abc   </div>
     46    <div class="flexbox"><div class="a"/>  abc   </div>
     47 
     48    <!-- whitespace around inline content in between flex items -->
     49    <div class="flexbox"><div class="a"/>  abc<div class="b"/></div>
     50    <div class="flexbox"><div class="a"/>abc   <div class="b"/></div>
     51    <div class="flexbox"><div class="a"/>  abc   <div class="b"/></div>
     52  </body>
     53 </html>