OLD | NEW |
(Empty) | |
| 1 <meta charset="utf-8"> |
| 2 <title>CSS Logical Properties: {max-,min-}block-size</title> |
| 3 <link rel="author" title="Xu Xing" href="mailto:openxu@gmail.com"> |
| 4 <link rel="help" href="https://drafts.csswg.org/css-logical-props-1/#logical-dim
ension-properties"> |
| 5 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#logical-to-
physical"> |
| 6 <script src="../../resources/testharness.js"></script> |
| 7 <script src="../../resources/testharnessreport.js"></script> |
| 8 |
| 9 <style> #dummy {} </style> |
| 10 |
| 11 <script> |
| 12 function isValidDeclaration(cssText) { |
| 13 var cssRule = document.styleSheets[0].cssRules[0]; |
| 14 cssRule.style = cssText; |
| 15 var valid = (cssRule.style.length > 0); |
| 16 cssRule.style = ""; |
| 17 return valid; |
| 18 } |
| 19 var tests = [ |
| 20 {cssText:"block-size: 1"}, |
| 21 {cssText:"min-block-size: 1"}, |
| 22 {cssText:"max-block-size: 1"}, |
| 23 {cssText:"inline-size: 1"}, |
| 24 {cssText:"min-inline-size: 1"}, |
| 25 {cssText:"max-inline-size: 1"}, |
| 26 ]; |
| 27 tests.forEach(function(t) { |
| 28 test(() => assert_false(isValidDeclaration(t.cssText)), "Check that unitless l
engths are not valid for logical properties in quirks mode"); |
| 29 }); |
| 30 </script> |
OLD | NEW |