tor-browser

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

grid-template-columns-intrinsic-auto-repeat-computed-withcontent.tentative.html (3433B)


      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-columns">
      8 <meta name="assert" content="grid-template-columns 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    font-size: 40px;
     16    min-width: 200px;
     17    width: 300px;
     18    max-width: 400px;
     19    min-height: 500px;
     20    height: 600px;
     21    max-height: 700px;
     22  }
     23  #child {
     24    min-width: 20px;
     25    width: 30px;
     26    max-width: 40px;
     27    min-height: 50px;
     28    height: 60px;
     29    max-height: 70px;
     30  }
     31 </style>
     32 </head>
     33 <body>
     34 <div id="container">
     35  <div id="target">
     36    <div id="child"></div>
     37  </div>
     38 </div>
     39 <script>
     40 
     41 // <auto-repeat> = repeat( [ auto-fill | auto-fit ] , [ <line-names>? <intrinsic-or-fixed-size> ]+ <line-names>? )
     42 test_computed_value("grid-template-columns", 'repeat(auto-fill, auto)', '30px 30px 30px 30px 30px 30px 30px 30px 30px 30px');
     43 test_computed_value("grid-template-columns", 'repeat(auto-fit, [one] auto)',
     44                    '[one] 300px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px [one] 0px');
     45 test_computed_value("grid-template-columns", 'repeat(auto-fill, min-content [two])',
     46                    '30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two] 30px [two]');
     47 test_computed_value("grid-template-columns", 'repeat(auto-fit, [three] max-content [four])',
     48                    '[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]');
     49 test_computed_value('grid-template-columns', '[a] 21px [b] repeat(auto-fill, [c] 22px [d] auto [e]) [f] 24px [g]',
     50                    '[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]');
     51 test_computed_value('grid-template-columns', '[a] 21px [b c] repeat(auto-fill, [d e] 22px [f g h] fit-content(200px) [i j k l]) [m n] 24px [o]',
     52                    '[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]');
     53 test_computed_value('grid-template-columns', '[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]',
     54                    '[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]');
     55 
     56 // <auto-track-list> =
     57 // [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?
     58 // <auto-repeat>
     59 // [ <line-names>? [ <intrinsic-or-fixed-size> | <fixed-repeat> ] ]* <line-names>?
     60 
     61 test_computed_value("grid-template-columns", '[one] repeat(2, minmax(50px, auto)) [two] 30px [three] repeat(auto-fill, auto) 40px [four five] repeat(2, minmax(200px, auto)) [six]',
     62                    '[one] 50px 50px [two] 30px [three] 30px 40px [four five] 200px 200px [six]');
     63 </script>
     64 </body>
     65 </html>