-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create display values for the special types of layout algorithms that MathML uses. #56
Comments
cc @rwlbuis |
Currently, most MathML elements have undefined display values. It is not clear how the layout is determined, although it is implicitly from the tag name. This is causing various issues for implementation purposes. Even in the specification, it is not clear how to revert the default "display: none" on annotations: https://mathml-refresh.github.io/mathml-core/#semantics-and-presentation For users, the most serious issue is that it is not possible to override existing layout of MathML tags with their own custom layout. For example to implement #29 we want to be able to do something like this using the CSS layout API:
(IIUC our rule of thumb was that if we remove features from MathML Core we should also add MathML IDL / shadowDOM / custom element / CSS layout APIs stuff at the same time so that people can write their own extensions) A simple proposal to address this issue is the following: Introduce a new "display: mathml" (one can bikeshed on the names... "math" or "math-auto" etc) that would be the default for most elements. Elements with this value would determine their layout according to the tag name, fallbacking to a reasonable default (e.g. mrow layout for MathML elements and inline for non-MathML elements). That way users can override the default layout and we only need to propose a single css display value to the CSSWG. Details about would have to be specified later when we do more testing / implementation work. The second use case is when someone wants to use math layout on non-MathML elements:
MathML currently relies a lot on tag name (e.g. for embellished operators or to distinguish very similar but different script layout) and properties (e.g. scriptlevel & displaystyle) and elements interact together. So I feel we would either need to simplify MathML and/or introduce many new CSS display values & properties too to propose a full math layout support equivalent to MathML. If the goal is just to add basic math layout, it can already done with flexbox or similar. Adding many properties and values is likely to be much harder to push at the CSSWG (even #31 seems difficult) so the proposal is not to do it for now. In that's needed in the future, we could still progressively expose the internal MathML layout algorithm. |
Consensus from 2019/09/12: We agreed to go with one |
Don't really need a test since test for fractions, etc., will cover the display |
My preference here is that MathML becomes less special.
Basically:
This needs tests, and if any box-tree fixups are required.
This is similar to how tables work today.
The text was updated successfully, but these errors were encountered: