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

Deprecate/Remove mphantom #65

Closed
fred-wang opened this issue Mar 3, 2019 · 8 comments
Closed

Deprecate/Remove mphantom #65

fred-wang opened this issue Mar 3, 2019 · 8 comments
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification

Comments

@fred-wang
Copy link

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.

@fred-wang fred-wang added MathML 4 Issues affecting the MathML 4 specification css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification labels Mar 3, 2019
@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 3, 2019

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?

@fred-wang
Copy link
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.

@fred-wang
Copy link
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".

@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 4, 2019

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.

@fred-wang
Copy link
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".

@fred-wang
Copy link
Author

So as I understand the current status is

  • Keep it in MathML Core, interpreted as mrow algo + "visibility: hidden"

@davidcarlisle
Copy link
Collaborator

I think that is good, yes.

@fred-wang fred-wang added the compatibility Issues affecting backward compatibility label Mar 20, 2019
@fred-wang fred-wang added the need resolution Issues needing resolution at MathML Refresh CG meeting label May 16, 2019
@fred-wang
Copy link
Author

Resolved on 2019/06//03 as in #65 (comment)
Core spec updated: https://mathml-refresh.github.io/mathml-core/#mphantom

@NSoiffer NSoiffer removed the need resolution Issues needing resolution at MathML Refresh CG meeting label Jun 10, 2019
@rwlbuis rwlbuis added need tests Issues related to writing WPT tests and removed need tests Issues related to writing WPT tests labels Oct 14, 2019
@rwlbuis rwlbuis closed this as completed Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification
Projects
None yet
Development

No branches or pull requests

4 participants