gap-shorthand.html (892B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Box Alignment Level 3: gap sets longhands</title> 6 <link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-gap"> 7 <meta name="assert" content="gap supports the full grammar '<row-gap> <column-gap>?'."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/shorthand-testcommon.js"></script> 11 </head> 12 <body> 13 <script> 14 test_shorthand_value('gap', 'normal', { 15 'row-gap': 'normal', 16 'column-gap': 'normal' 17 }); 18 19 test_shorthand_value('gap', '10px 20%', { 20 'row-gap': '10px', 21 'column-gap': '20%' 22 }); 23 24 test_shorthand_value('gap', '10px normal', { 25 'row-gap': '10px', 26 'column-gap': 'normal' 27 }); 28 29 test_shorthand_value('gap', 'normal calc(20% + 10px)', { 30 'row-gap': 'normal', 31 'column-gap': 'calc(20% + 10px)' 32 }); 33 </script> 34 </body> 35 </html>