w3c / w3c/mathml

Simplification of the mstyle element

Open
#1 29 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compatibility css / html5 MathML 4 need polyfill
Dominant language
HTML
Stars
82
Forks
23
PR merge metrics
No merged PRs in 30d

Description

This proposal is to simplify mstyle so that it only supports the following attributes:

  • displaystyle
  • dir
  • mathsize
  • mathbackground
  • mathcolor
  • mathvariant
  • scriptlevel

And maybe:

  • scriptsizemultiplier
  • scriptminsize

From the Math WG mailing list:
https://lists.w3.org/Archives/Public/www-math/2016Jul/0024.html

From the appendix of the original "MathML in HTML5" document:
"The mstyle element duplicates the CSS inheritance mechanism in a CSS-incompatible way and has many exceptions to workaround the fact that attribute names may be used for different purposes. In practice, many of its attributes are not useful and never used. It is a burden for implementers since they essentially have to reimplement a specific “attribute” inheritance mechanism to support the general case even if the most prominent attributes have obvious mapping to CSS. It is also a performance issue to perform the rendering and keep it up-to-date since the rendering on any node may depend on its mstyle ancestors. In this document, it instead suggested to keep only attributes that are compatible with CSS and five new CSS properties are introduced in section 2.3.1. These attributes actually correspond to what is used in practice. "

edit:
This is the proposal for CSS attributes that cannot be mapped to style yet: https://github.com/mathml-refresh/mathml-css-proposals#mathml-css-proposals

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 by reading the proposal in this issue, the linked Math WG mailing-list discussion, and the mathml-css-proposals document. Determine the agreed supported attributes and how the CSS-only proposal affects mstyle before identifying the relevant MathML specification sections to update. Done means the specification consistently reflects the resolved attribute set and its CSS mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
documentation, frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.