|
3 | 3 | <link rel=" author" title=" Oriol Brufau" href=" [email protected]" >
|
4 | 4 | <link rel="help" href="https://drafts.csswg.org/css-tables-3/#in-fixed-mode">
|
5 | 5 | <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10937">
|
| 6 | +<meta name="assert" content="Fixed table layout is triggered except when inline-size is auto."> |
6 | 7 | <link rel="stylesheet" href="./support/base.css">
|
7 | 8 |
|
8 | 9 | <style>
|
@@ -52,26 +53,25 @@ <h1>Fixed Layout</h1>
|
52 | 53 | <script src="/resources/testharness.js"></script>
|
53 | 54 | <script src="/resources/testharnessreport.js"></script>
|
54 | 55 | <script>
|
55 |
| -let sizeData = { |
56 |
| - "10px": true, |
57 |
| - "100%": true, |
58 |
| - "calc(10px + 100%)": true, |
59 |
| - "auto": false, |
60 |
| - "min-content": true, |
61 |
| - "max-content": true, |
62 |
| - "fit-content": true, |
63 |
| - "calc-size(any, 10px + 100%)": true, |
| 56 | +let sizes = [ |
| 57 | + "10px", |
| 58 | + "100%", |
| 59 | + "calc(10px + 100%)", |
| 60 | + "auto", |
| 61 | + "min-content", |
| 62 | + "max-content", |
| 63 | + "fit-content", |
| 64 | + "calc-size(any, 10px + 100%)", |
| 65 | + "fit-content(0)", |
| 66 | + "stretch", |
| 67 | + "contain", |
64 | 68 |
|
65 |
| - // These expectations are tentative, see https://github.com/w3c/csswg-drafts/issues/10937 |
66 |
| - "fit-content(0)": true, |
67 |
| - "stretch": true, |
68 |
| - |
69 |
| - // These are non-standard, expect the most popular behavior among the supporting implementations. |
70 |
| - "-moz-available": true, |
71 |
| - "-webkit-fill-available": true, |
72 |
| - "intrinsic": true, |
73 |
| - "min-intrinsic": true, |
74 |
| -}; |
| 69 | + // These are non-standard sizes. |
| 70 | + "-moz-available", |
| 71 | + "-webkit-fill-available", |
| 72 | + "intrinsic", |
| 73 | + "min-intrinsic", |
| 74 | +]; |
75 | 75 |
|
76 | 76 | function checkSize(size, allowsFixed) {
|
77 | 77 | let fragment = template.content.cloneNode(true);
|
@@ -101,8 +101,9 @@ <h1>Fixed Layout</h1>
|
101 | 101 | }, size);
|
102 | 102 | }
|
103 | 103 |
|
104 |
| -for (let [size, allowsFixed] of Object.entries(sizeData)) { |
| 104 | +for (let size of sizes) { |
105 | 105 | if (CSS.supports("width", size)) {
|
| 106 | + let allowsFixed = size !== "auto"; |
106 | 107 | checkSize(size, allowsFixed);
|
107 | 108 |
|
108 | 109 | // calc-size() should trigger fixed table layout.
|
|
0 commit comments