[cssom] Serialization of a declaration block not idempotent in presence of logical properties.

Open
#3,244 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
css
Domain
frontend

Research direction

Start with the HTML testcase in the issue and the CSSOM serialization rules it exercises. Reproduce the cssText output, then trace how declaration blocks containing logical and physical properties are serialized. Done means serializing the declaration block is idempotent, with the relevant behavior covered by a regression test.

Written by the indexing model from the issue text.

Description

cssom-1

Testcase is:

<!doctype html>
<div id="test" style="margin-top: 10px; margin-block-start: 20px; margin-inline-start: 30px; margin-bottom: 40px; margin-left: 50px; margin-right: 60px"></div>
<pre>
<script>
  document.writeln(test.style.cssText);
</script>
</pre>

Which serializes to:

margin: 10px 60px 40px 50px; margin-block-start: 20px; margin-inline-start: 30px;

Which is not idempotent.

cc @FremyCompany

Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.