Skip to content

Deprecate/Remove mphantom #65

Closed
Closed

Description

@fred-wang

The mphantom element is inspired from LaTeX's \phantom and makes sense in a non-Web context.

In a Web context, it's really equivalent to mrow with visibility: hidden, so it's probably not very useful. Let's decide if we want to deprecate/remove it from MathML full/core.

Activity

  1. added
    MathML 4
    css / html5
    MathML Core
    on Mar 3, 2019
  2. NSoiffer commented on Mar 3, 2019

    @NSoiffer
    Contributor

    That's a good point. It is used (I've used it) for the same reasons it is there in TeX. Since it is used, it should remain in "full", but can go from "core" if we can write a polyfill for it. I assume it would simply turn into the contents wrapped with
    <mrow style="visibility:hidden;"> ... </mrow>

    Maybe the mrow isn't even needed? Hopefully none of the children turn visibility back on... Any other potential problems?

  3. fred-wang commented on Mar 3, 2019

    @fred-wang
    Author

    Yes, mphantom is implemented in WebKit/Gecko the same way as mrow but with some "visibility: hidden" in the CSS user agent stylesheet.

    Indeed users actually don't need to insert an mrow, you can just put "visibility: hidden" on any MathML element to hide a MathML subtree. However, MathML defines mphantom as "mrow-like" (which implies several properties) so polyfills should really rely on mrow in general to keep the current mphantom behavior.

    Yes, it's possible to turn visibility back on descendants or on the mphantom itself if the user explicitly change the corresponding CSS style. I don't think that's an issue though? We should give freedom to users to override things if they really want to.

  4. fred-wang commented on Mar 3, 2019

    @fred-wang
    Author

    ...and since it is used a lot, I think "Core" should just say it is deprecated for now and recommend the alternative of mrow with "visibility: hidden".

  5. NSoiffer commented on Mar 4, 2019

    @NSoiffer
    Contributor

    I'm baffled by your comment. If something is used with some frequency, we should be very cautious about deprecating it. The full spec is not aimed at just web applications, so saying "use mrow with 'visibility: hidden'" is not practical in environments that lack CSS support.

    The full spec will say what is in core and if someone is targeting only browsers, then they may make the decision that they don't want JS running to handle mphantom, but that is an author decision. They may care about more interoperability with non browser applications.

  6. fred-wang commented on Mar 5, 2019

    @fred-wang
    Author

    OK, ignore my last comment then. In any case, I don't care about what is in MathML full as long as what is written in MathML Core remains equivalent to "mrow + visibility: hidden".

  7. fred-wang commented on Mar 14, 2019

    @fred-wang
    Author

    So as I understand the current status is

    • Keep it in MathML Core, interpreted as mrow algo + "visibility: hidden"
  8. davidcarlisle commented on Mar 14, 2019

    @davidcarlisle
    Collaborator

    I think that is good, yes.

  9. added
    compatibility
    on Mar 20, 2019
  10. added
    need resolution
    on May 16, 2019
  11. removed
    need resolution
    on Jun 10, 2019
  12. added
    need tests
    and removed
    need tests
    on Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MathML 4MathML Corecompatibilitycss / html5

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions