Skip to content
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

[Meta] MathML Core related CSS #5384

Open
bkardell opened this issue Aug 3, 2020 · 2 comments
Open

[Meta] MathML Core related CSS #5384

bkardell opened this issue Aug 3, 2020 · 2 comments
Labels

Comments

@bkardell
Copy link
Contributor

bkardell commented Aug 3, 2020

After quite a lot of work, the MathML Core L1 spec, implementation work and discussions have yielded a real strong grip on how everything fits together, and it's gone through a TAG review. Since this integration has a lot to do with CSS, we have several proposals for the CSSWG that explain and expose what we feel are the important aspects. Some of these were brought last year, but here I'll make an effort to provide context, clarify and link them all up here in this meta issue so that readers can have and navigate a more complete picture, as this concerned some people before....

Background to understand for these proposals

MathML, not unlike SVG, was created at a time where it was solving problems that would later be solved by CSS. Similar to SVG, and HTML at the time - it chose to solve those problems via attributes. The types/values of these attributes were also kind of under-defined. A lot of the work in defining MathML Core, just as it was for SVG, has been in aligning/mapping those to existing CSS and the larger platform. Many of these attributes in MathML are in wide use and created by tools and editors today, and are already supported in existing browsers. Because of this, you'll note that many of these proposals explain a mapping to something in CSS marked as presentational hints where appropriate and the specification strongly encourages use of corresponding CSS instead (for example mathcolor and mathsize involve no CSS proposals, they are just mappings). In some cases, existing CSS features are not adequate to mathmatical rendering needs, and these are the propsals MathML Core has in terms of some additions to CSS that make it possible.

For mathematical rendering, MathML Core has defined the following necessary minimal values. While their form is pretty maleable, the specific powers they add are important in order to create compatability with widely used features. Some of these are already used internally in implementations, but we have now well-defined them and would like to expose them to authors, increase their interopability and make them standard and well explained. The proposals are outlined and rationales explained separately in simple terms, the spec itself contains many details with links in each.

Lots of tests in https://github.com/web-platform-tests/wpt/tree/master/mathml and some noted in other locations in issues (like fonts).

@fantasai
Copy link
Collaborator

See also #5534

@fred-wang
Copy link

fred-wang commented Sep 5, 2022

@bkardell: I believe this is the status of the math proposals:

  1. There were questions about whether these new properties should live (existing specs? MathML Core? others?). On [css-fonts] Add font-size: math, math-depth and math-style #5536 (comment) @fantasai mentioned to keep them in MathML Core. That said, font-size: math and font-family: math have been added to CSS fonts:
    https://drafts.csswg.org/css-fonts/#font-size-prop
    https://drafts.csswg.org/css-fonts/#valdef-font-family-math

  2. Issue for display: math; ([css-display] math/inline-math #5385) is still open.

  3. Issue for text-transform: math-* ([css-text] text-transform values for MathML  #5386) is still open.

    • The consensus was only to have text-transform: math-auto. However, the MathML Core spec still defines many 'math-*' values and there are corresponding WPT tests.
    • Chrome only implements math-auto under a flag since there was no consensus for the other values.
    • WebKit and Firefox implement other mathvariant values, but again these implementations cannot be converted to a CSS-based text-transform given the lack of consensus.
  4. Issue for math-style ([math] math style (minimizing logical height of an equation) #5387) is still open.

    • I believe we can close that issue, this is defined in MathML Core.
    • WebKit, Chrome and Firefox implement it (under a flag for Chrome and Firefox)
  5. Issue for math-shift ([math] "cramped" script style #5388) is closed, so I guess nothing to be done here besides finishing implementation in Firefox and WebKit.

  6. Issue for math-depth+font-size: math ([css-fonts-4] Managing the scaling of font-size within MathML rendering #5389) is closed, so I guess nothing to be done here besides finishing implementation in Firefox and WebKit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants