Re: [csswg-drafts] [css-display] math/inline-math (#5385)

@fred-wang wrote:
> MathML layout is much more complex and there are too many tag-based rules inherited from MathML3 ; we are not proposing to introduce a new display for each MathML tag

There are only a dozen or so MathML-specific box types in Gecko, so I don't think that's a problem. CSS `display` can easily handle a dozen more `math-*` keywords if we need them.  Some elements like `<mtable>, <mtr>, <mtd>` can use already existing table values.

I discussed this with @emilio and we don't like that `display: math` should magically compute to different values based on the tag name or that it should magically create different box types for `math` based on the tag name. If we want to express MathML box construction in CSS then it should follow normal CSS rules and **not** have special MathML hacks for how property values are computed and applied.  Hacks like that only make CSS harder to implement, spec and teach to authors.

Fwiw, here's the MathML-specific box types that Gecko implements (besides `math/block math`): `token, mrow, mo, mfrac, mmultiscripts, munderover, mpadded, mspace, msqrt, mroot, maction, menclose, semantics`. (I don't know how well these match MathML Core. Maybe some could be merged if they are reasonably close in their layout?)

Anyway, we would prefer to keep `display` values having consistent behavior, i.e. that the value alone determines the box type to create, so we propose to add `math-token`, `math-mrow` etc for the box types that MathML needs. These values would have similar behavior as the existing [Layout-internal values](https://drafts.csswg.org/css-display/#layout-specific-display).  This is a simpler model that can be reasoned about.

-- 
GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5385#issuecomment-714664688 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 22 October 2020 18:04:17 UTC