tor-browser

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

grid-template-rows-intrinsic-auto-repeat-computed-withcontent.tentative.html (3434B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Grid Lanes Layout Test: getComputedStyle().gridTemplateColumns with intrinsic auto repeats</title>
      6 <link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
      7 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-rows">
      8 <meta name="assert" content="grid-template-rows computed value is the keyword none or a computed track list.">
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <script src="/css/support/computed-testcommon.js"></script>
     12 <style>
     13  #target {
     14    display: grid-lanes;
     15    grid-lanes-direction: row;
     16    font-size: 40px;
     17    min-height: 200px;
     18    height: 300px;
     19    max-height: 400px;
     20    min-width: 500px;
     21    width: 600px;
     22    max-width: 700px;
     23  }
     24  #child {
     25    min-height: 20px;
     26    height: 30px;
     27    max-height: 40px;
     28    min-width: 50px;
     29    width: 60px;
     30    max-width: 70px;
     31  }
     32 </style>
     33 </head>
     34 <body>
     35 <div id="container">
     36  <div id="target">
     37    <div id="child"></div>
     38  </div>
     39 </div>
     40 <script>
     41 
     42 // <auto-repeat> = repeat( [ auto-fill | auto-fit ] , [ <line-names>? <intrinsic-or-fixed-size> ]+ <line-names>? )
     43 test_computed_value("grid-template-rows", 'repeat(auto-fill, auto)', '30px 30px 30px 30px 30px 30px 30px 30px 30px 30px');
     44 test_computed_value("grid-template-rows", 'repeat(auto-fit, [one] auto)',
     45                    '[one] 300px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px');
     46 test_computed_value("grid-template-rows", 'repeat(auto-fill, min-content [two])',
     47                    '30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two]');
     48 test_computed_value("grid-template-rows", 'repeat(auto-fit, [three] max-content [four])',
     49                    '[three] 30px [four three] 0px [four three] 0px [four three] 0px [four three] 0px [four three] 0px [four three] 0px [four three] 0px [four three] 0px [four three] 0px [four]');
     50 test_computed_value('grid-template-rows', '[a] 21px [b] repeat(auto-fill, [c] 22px [d] auto [e]) [f] 24px [g]',
     51                    '[a] 21px [b c] 22px [d] 41.75px [e c] 22px [d] 41.75px [e c] 22px [d] 41.75px [e c] 22px [d] 41.75px [e f] 24px [g]');
     52 test_computed_value('grid-template-rows', '[a] 21px [b c] repeat(auto-fill, [d e] 22px [f g h] fit-content(200px) [i j k l]) [m n] 24px [o]',
     53                    '[a] 21px [b c d e] 22px [f g h] 30px [i j k l d e] 22px [f g h] 30px [i j k l d e] 22px [f g h] 30px [i j k l d e] 22px [f g h] 30px [i j k l m n] 24px [o]');
     54 test_computed_value('grid-template-rows', '[a] repeat(2, [b] 20px [c d] 21px [e f g]) [h i] repeat(auto-fit, [j] auto [k l m] min-content [n o p q]) [r s]',
     55                    '[a b] 20px [c d] 21px [e f g b] 20px [c d] 21px [e f g h i j] 0px [k l m] 0px [n o p q j] 0px [k l m] 30px [n o p q j] 158px [k l m] 30px [n o p q r s]');
     56 
     57 // <auto-track-list> =
     58 // [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?
     59 // <auto-repeat>
     60 // [ <line-names>? [ <intrinsic-or-fixed-size> | <fixed-repeat> ] ]* <line-names>?
     61 
     62 test_computed_value("grid-template-rows", '[one] repeat(2, minmax(50px, auto)) [two] 30px [three] repeat(auto-fill, auto) 40px [four five] repeat(2, minmax(200px, auto)) [six]',
     63                    '[one] 50px 50px [two] 30px [three] 30px 40px [four five] 200px 200px [six]');
     64 </script>
     65 </body>
     66 </html>