Idea: Consider introducing CSS math-leading-space / math-trailing-space properties
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 56
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
We had mentioned some issues related to making operator properties compatible with CSS in the past (dependency on text content, properly handle embellished op, relative values, invalid values, etc). With the good effort made in level 1, I believe we could just map lspace/rspace attributes to new CSS properties math-leading-space / math-trailing-space and use these properties if non-auto (instead of the attribute). Actually that's how it's implemented internally in Chromium.
Operator spacing is only style, so we should be able to to that via CSS. That would basically allow authors to easily redefine their own spacing via e.g. CSS classes (again: but not from mo content) instead of asking to change the internal operator dictionary or to put explicit lspace/rspace everywhere:
.operator-with-thickmathspace {
math-leading-space: 0.277777778em;
math-trailing-space: 0.277777778em;
}
.latexml-invisible-op {
math-leading-space: 0;
math-trailing-space: 0;
}
<mo class="operator-with-thickmathspace">
<mo class="latexml-invisible-op">
I believe this would be more in line with the principle of the Web: having a stable, interoperable and well-tested operator dictionary but CSS properties to allow authors to easily customize it and maintain that style.
Note: this is different from margin/padding because of embellish op, handling in mrow only, interpretation of auto as "fallback to the dictionary", etc.
Possible extensions:
- Extend this to other mo attributes & operator properties.
- Extend this to other elements, so that people can more easily tweak interop spacing. Including implement negative spacing without "negative size' (#132).
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 with the linked MathML Core algorithm for determining embellished-operator properties and review the existing discussion of lspace/rspace and operator properties. The work is done when the project has reached agreement on the proposed CSS properties, their interaction with auto and the operator dictionary, and any required specification updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100