w3c / w3c/editing

The mapping CSS property for execCommand('underline') and execCommand('strikeThrough')

Open
#241 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

execCommand
Dominant language
HTML
Stars
202
Forks
43
PR merge metrics
No merged PRs in 30d

Description

The definition in inline formatting commands still use text-decoration for underline and strikeThrough command. However, the up-to-date [css-text-decor-4] makes text-decoration a shorthand property, and it may contains the computed values of other longhands, e.g. text-decoration-color, text-decoration-thickness.

My proposal is: replace text-decoration with text-decoration-line because It's not a good idea to use the shorthand style to represent these commands, and the serialization of the computed value of this shorthand is easy to be impacted by other properties. I can file a PR to update it if this is accepted.

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.

Research direction

Start with the inline formatting commands section linked in the issue and compare its underline and strikeThrough mappings with the CSS Text Decoration Level 4 definition linked there. Done means updating those mappings to use text-decoration-line instead of text-decoration, then checking the surrounding specification text for consistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.