Accent gap
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 56
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
I don’t know if this is just due to buggy browser implementations, but Chrome and Safari both do not have any gap between the base and the accent. (And given that these two follow the Core specification more closely than Firefox does, at the moment, this leads me to think that they are following the spec here and Firefox doesn’t.)
Consider this snippet (MDN playground):
<math display="block">
<mover accent="true">
<mi>x</mi>
<mo stretchy="true">˙</mo>
</mover>
</math>
(The stretchy="true" is there just to work around a Safari bug.)
Chrome and Safari display it like this on my Mac, using the default math font (STIX2):
While Firefox displays it like this:
One can fix the problem in Chrome and Safari with this CSS (MDN playground):
mover[accent="true" i] > mo:nth-child(2) {
transform: translateY(-0.2ex);
}
where I chose -0.2ex because it roughly looks to me like what the gap in LaTeX is. (EDIT: though perhaps 0.15ex is a better value and perhaps using margin-bottom is better than using transform.)
It then looks like this:
Should such an accent gap be part of the spec?
There is an existing similar issue: #254 but it doesn't really articulate this particular problem well.
There have also been reports about this elsewhere: https://github.com/arXiv/html_feedback/issues/4007
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the MathML Core behavior for accented movers, then compare the Chrome, Safari, and Firefox examples in the issue. Read the related issue #254 and the linked arXiv report for context. Done means reaching and documenting a specification decision about whether an accent gap is required and what behavior should be interoperable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100