w3c / w3c/mathml-core

Expose height/depth info

Open
#38 7 comments 2 reactions 1 assignee View on GitHub

@bkardell is already working on this.

Since Aug 28, 2023.

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

Description

Having written a bunch of "polyfills" for MathML, there were three pieces of missing functionality that required hacks to implement: find the height/depth of an element, convert a CSS length value to pixels (e.g., '3em'), and clone an element including it's shadow root. The later two issues are not specific to MathML, but MathML is somewhat unique in defining and using an element's height above the baseline and depth below the baseline.

Rather than having to rely on a hack, MathML elements should provide a method to get this information. This could be an extension of getBoundingClientRect that adds baseline info or depth (since height above baseline is easily computed from that) or it could be an entirely new method that returns height/depth/width info (the later often being useful when doing computations involving box dimensions.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.