tor-browser

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

multicol-container-properties.mjs (1365B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 // InactivePropertyHelper test cases:
      6 // `column-fill`, `column-rule`, `column-rule-color`, `column-rule-style`,
      7 // and `column-rule-width`.
      8 let tests = [];
      9 
     10 for (const { propertyName, propertyValue } of [
     11  { propertyName: "column-fill", propertyValue: "auto" },
     12  { propertyName: "column-rule", propertyValue: "1px solid black" },
     13  { propertyName: "column-rule-color", propertyValue: "black" },
     14  { propertyName: "column-rule-style", propertyValue: "solid" },
     15  { propertyName: "column-rule-width", propertyValue: "1px" },
     16 ]) {
     17  tests = tests.concat(createTestsForProp(propertyName, propertyValue));
     18 }
     19 
     20 function createTestsForProp(propertyName, propertyValue) {
     21  return [
     22    {
     23      info: `${propertyName} is active on a multi-column container`,
     24      property: propertyName,
     25      tagName: "div",
     26      rules: [`div { columns:2; ${propertyName}: ${propertyValue}; }`],
     27      isActive: true,
     28    },
     29    {
     30      info: `${propertyName} is inactive on a non-multi-column container`,
     31      property: propertyName,
     32      tagName: "div",
     33      rules: [`div { ${propertyName}: ${propertyValue}; }`],
     34      isActive: false,
     35    },
     36  ];
     37 }
     38 
     39 export default tests;