w3c / w3c/mathml-core

embellished operator / space-like definition and display: inline/block math

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
56
Forks
20
PR merge metrics
No merged PRs in 30d

Description

cc @bfgeek @mrego

Many layout description for MathML elements exit early with some text deferring to other spec: "If the element does not have its computed display property equal to block math or inline math then it is laid out according to the CSS specification where the corresponding value is described"

Embellished operator and space-like definition are independent of the display of elements though, so for something like

<math>
  <mrow>
    <mrow style="display: inline">....</mrow>
  </mrow>
</math>

The mrow algo to layout of the math tag will check whether the outer mrow is an embellished op, and so check whether the inner mrow is space-like and then (ignoring the display value) apply the recursive definition with grouping elements and space-like descendants: https://w3c.github.io/mathml-core/#dfn-space-like

Similarly, for something like

<math>
    <mrow style="display: inline">....</mrow>
</math>

The mrow algo will check whether the mrow is an embellished op (ignoring the display value and) using the definition https://w3c.github.io/mathml-core/#dfn-embellished-operator

I wonder if we could simplify the space-like and embellished-op definitions by excluding the elements that don't have display property equal to block math or inline math. Essentially, this means an algo will exit immediately for non-math display. This is what Chromium do and this simplify further code (in particular when browsing the list of in-flow children although maybe this is specific to Chromium LayoutNG and blockification of MathML nodes).

Contributor guide

No contributing guide indexed for this repository

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 MathML Core definitions of space-like and embellished operator, then trace the mrow layout algorithm described in the issue. Compare the behavior for inline and block math with elements using other display values, and review the linked specification sections to determine whether the proposed definition change is consistent. Done means the specification's definitions and affected layout descriptions agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.