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

vertical alignment CSS not working on Firefox/Linux #123

Closed
Debenben opened this issue May 20, 2018 · 17 comments
Closed

vertical alignment CSS not working on Firefox/Linux #123

Debenben opened this issue May 20, 2018 · 17 comments

Comments

@Debenben
Copy link

Using the current demo https://mathjax.github.io/mj3-demos/mj3-tex2html-global.html with Firefox/Linux the input \displaystyle\sum (1)\textstyle\sum (1)\scriptstyle\sum (1)\scriptscriptstyle\sum (1) looks like

screenshot from 2018-05-20 22-43-52

where the bottom edges of brackets, numbers and operators are aligned, instead of
screenshot from 2018-05-20 22-43-30
(LaTeX) or
screenshot from 2018-05-20 22-45-02
(math.stackexchange)

@dpvc
Copy link
Member

dpvc commented May 24, 2018

I am not able to reproduce your result in Firefox on Mac OS. On the other hand, if I disable one of the CSS rules, I do get your result, so I'm wondering if that rule isn't triggering properly for you.

Can you open the developer console and inspect one of the parentheses, and see if you see the highlighted rule below:

mjv3

(the one for mix-symmetric > mjx-c)? If I disable this rule, I see the same result that you see.

@Debenben
Copy link
Author

I think the rule is there:

screenshot from 2018-05-24 14-03-32

If I disable the rule, it does not change anything.

@dpvc
Copy link
Member

dpvc commented May 24, 2018

Thanks for checking. If you change middle to top in this rule, what happens? If you change it to 1em what happens?

@Debenben
Copy link
Author

vertical-align: top

screenshot from 2018-05-24 15-30-35

vertical-align: 1em

screenshot from 2018-05-24 15-31-17

vertical-align: bottom

screenshot from 2018-05-24 15-32-16

@Debenben Debenben changed the title horizontal alignment vertical alignment CSS not working on Firefox/Linux May 24, 2018
@dpvc
Copy link
Member

dpvc commented May 24, 2018

OK, that is helpful. Can you try this? Select the mjx-symmetric element surrounding one of the parentheses, and add display: inline-block to the rule for that element:

mj3-align1

Then select all the mjx-mstyle elements (one at a time) and add display: inline-block as element properties:

mj3-align2

You'll have to do it individually, since there is no CSS rule for mjx-mstyle currently that would let you do it for all at once.

See if doing that resolves the issue (fingers crossed).

@Debenben
Copy link
Author

I think that is the issue. I was able to apply it to the first bracket:

screenshot from 2018-05-24 15-56-27

Maybe I am just too stupid to apply it to the others, but it seemed like the display: inline-block got inherited from the first one, so it was already shown in the console with the green marking and I couldn't add it again.

@dpvc
Copy link
Member

dpvc commented May 24, 2018

OK, I've pushed a modified version for testing that includes the display: inline-block settings. Put your example into that and see if it works properly.

@Debenben
Copy link
Author

No, that doesn't work. It ist the same as the unmodified version.

screenshot from 2018-05-24 16-48-00

For the screenshot I uploaded earlier, I might have added some display: inline-block property falsely to some other element as well.

@dpvc
Copy link
Member

dpvc commented May 24, 2018

OK thanks. I'll have to think of something else. What flavor of linux are you using, and what version of Firefox?

@Debenben
Copy link
Author

debian stretch with firefox version 52.8.0

@zorkow
Copy link
Member

zorkow commented May 24, 2018

I can reproduce that issue on Firefox/Linux v58.2.0 and v61.0b7 (aurora channel).

@zorkow
Copy link
Member

zorkow commented May 24, 2018

I tried MacOS, Firefox v61.0beta and could not reproduce the problem.

However, on ChromeOS, Firefox v60.0.1 I can see the same issue. So it is probably a Linux problem.

@zorkow
Copy link
Member

zorkow commented May 24, 2018

With Firefox/Chrome/Edge/IE11 on Windows, I can reproduce the same issue. So the expected behaviour seems to be a MacOS, Blink/Linux anomaly. Could it be a font related issue?

@davidlowryduda
Copy link

Do you mean that you could not reproduce the same issue on Windows?

@dpvc
Copy link
Member

dpvc commented May 25, 2018

I am also able to reproduce on windows. So it looks like Mac OS is the outlier. I will have to rethink how this is being handled. Rats!

@dpvc
Copy link
Member

dpvc commented May 26, 2018

I've made a PR (#125) that includes a fix for this.

dpvc added a commit that referenced this issue Aug 9, 2018
Fix symmetric operator placement bug.  #123
@dpvc
Copy link
Member

dpvc commented Oct 6, 2018

This has been merged into the master branch.

@dpvc dpvc added fixed and removed in current beta labels Oct 6, 2018
@dpvc dpvc closed this as completed Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants