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/. */
5 // InactivePropertyHelper test cases:
6 // `grid-auto-columns`, `grid-auto-flow`, `grid-auto-rows`, `grid-template`,
7 // `grid-template-areas`, `grid-template-columns`, `grid-template-rows`,
8 // and `justify-items`.
11 for (const { propertyName, propertyValue } of [
12 { propertyName: "grid-auto-columns", propertyValue: "100px" },
13 { propertyName: "grid-auto-flow", propertyValue: "columns" },
14 { propertyName: "grid-auto-rows", propertyValue: "100px" },
15 { propertyName: "grid-template", propertyValue: "auto / auto" },
16 { propertyName: "grid-template-areas", propertyValue: "a b c" },
17 { propertyName: "grid-template-columns", propertyValue: "100px 1fr" },
18 { propertyName: "grid-template-rows", propertyValue: "100px 1fr" },
19 { propertyName: "justify-items", propertyValue: "center" },
21 tests = tests.concat(createTestsForProp(propertyName, propertyValue));
24 function createTestsForProp(propertyName, propertyValue) {
27 info: `${propertyName} is active on a grid container`,
28 property: propertyName,
30 rules: [`div { display:grid; ${propertyName}: ${propertyValue}; }`],
34 info: `${propertyName} is inactive on a non-grid container`,
35 property: propertyName,
37 rules: [`div { ${propertyName}: ${propertyValue}; }`],