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

CSS implementation of <ms> does not work in RTL mode #126

Closed
fred-wang opened this issue Aug 22, 2019 · 3 comments
Closed

CSS implementation of <ms> does not work in RTL mode #126

fred-wang opened this issue Aug 22, 2019 · 3 comments
Labels
css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification

Comments

@fred-wang
Copy link

cc @emilio

(See also #120 about whether ms is actually useful / important or if we could just remove it from core)

The CSS implementation of MathML Core uses the pseudo elements :before and :after to implement the ms element: https://mathml-refresh.github.io/mathml-core/#string-literal-ms

Not sure whether it's described explicitly in CSS, but the quotes are not inverted in RTL mode, contrary to the MathML3 expectation. The following test exported from Gecko's test suite fails in all browsers: https://w3c-test.org/mathml/presentation-markup/direction/direction-009.html

It has been failing in Gecko after some refactoring to move to a CSS-based implementation and avoid some security/design issues. For details, see https://bugzilla.mozilla.org/show_bug.cgi?id=787215

@fred-wang
Copy link
Author

Pure HTML/CSS test:

<style>
  .ms[lquote]:before {
      content: attr(lquote);
  }
  .ms[rquote]:after {
      content: attr(rquote);
  }
</style>
<div style="width: 15em">
  <div>
    <div class="ms" lquote="START" rquote="END">[LTR]</div>
  </div>
  <div>
    <div class="ms" style="direction: rtl;" lquote="START" rquote="END">[RTL]</div>
  </div>
</div>

of using valid HTML code:

<style>
  div {
      quotes: "START" "END";
  }
  .ms:before {
      content: open-quote;
  }
  .ms:after {
      content: close-quote;
  }
</style>
<div style="width: 15em">
  <div>
    <div class="ms">[LTR]</div>
  </div>
  <div>
    <div class="ms" style="direction: rtl;">[RTL]</div>
  </div>
</div>

@fred-wang fred-wang added css / html5 Issues related to CSS or HTML5 interoperability MathML 4 Issues affecting the MathML 4 specification MathML Core Issues affecting the MathML Core specification need resolution Issues needing resolution at MathML Refresh CG meeting labels Aug 22, 2019
@fred-wang
Copy link
Author

Consensus from 2019/11/11: Keep ms in MathML Core but make it behave like mn and add a note to tell people to either put the quotes in the contents or add CSS to style it via before/after.

(we didn't agree put probably the note should mention this bug in RTL mode)

@fred-wang fred-wang removed MathML 4 Issues affecting the MathML 4 specification need resolution Issues needing resolution at MathML Refresh CG meeting labels Nov 25, 2019
@fred-wang
Copy link
Author

merged into #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification
Projects
None yet
Development

No branches or pull requests

1 participant