Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test has a WPT meta file that expects 1 subtest issues.
  • This WPT test may be referenced by the following Test IDs:
<!doctype html>
<meta charset=utf-8>
<title>Logical shorthands follow the usual prioritization based on number of component longhands</title>
<meta name="assert" content="Shorthand properties with fewer longhand components override those with more longhand components (e.g. border-top overrides border-color).">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../css-animations/support/testcommon.js"></script>
<div id="log"></div>
<script>
'use strict';
test(t => {
const div = addDiv(t);
const anim = div.animate(
{
marginInlineStart: '100px',
marginInline: '200px',
margin: 'logical 300px',
},
{ duration: 1, easing: 'step-start' }
);
assert_equals(getComputedStyle(div).marginLeft, '100px');
assert_equals(getComputedStyle(div).marginRight, '200px');
assert_equals(getComputedStyle(div).marginTop, '300px');
assert_equals(getComputedStyle(div).marginBottom, '300px');
}, 'Logical shorthands follow the usual prioritization based on number of'
+ ' component longhands');
</script>