[csswg-drafts] [web-animations-1] commitStyles does not specify how logical properties are committed in `commitStyles()` (#12637)

graouts has just created a new issue for https://github.com/w3c/csswg-drafts:

== [web-animations-1] commitStyles does not specify how logical properties are committed in `commitStyles()` ==
The specification for the [`commitStyles()`](https://drafts.csswg.org/web-animations-1/#dom-animation-commitstyles) method does not explicitly say how to deal with a logical property. Should the logical property be committed to the inline style, or its matching physical property? The [relevant WPT test](https://github.com/web-platform-tests/wpt/blob/90bf88acc8231c71479b44d9733fca3e779c1b0b/web-animations/interfaces/Animation/commitStyles.html#L438C1-L452C1) expects a physical property to be committed and that is the behavior implemented by Firefox:


```javascript
test(t => {
  const div = createDiv(t);
  div.style.marginLeft = '10px';


  const animation = div.animate(
    { marginInlineStart: '20px' },
    { duration: 1 }
  );
  animation.finish();


  animation.commitStyles();


  assert_equals(div.style.marginLeft, '20px');
}, 'Commits logical properties as physical properties');
```


 WebKit is changing in [bug 297766](https://bugs.webkit.org/show_bug.cgi?id=297766) to implement this behavior, but I believe the spec should be clear about this.

Cc @flackr, @canalun and @birtles

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12637 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 22 August 2025 06:13:45 UTC