-
Notifications
You must be signed in to change notification settings - Fork 5
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
removed outdated CSS #116
removed outdated CSS #116
Conversation
How carefully have you tested this @jorgenfinsveen ? |
I think you have to check very carefully if the Mathjax class can be created by the mathjax library, i.e. make a question using maths notation, render the page, and inspect the code surrounding the formula in the browser. |
@hgeorgsch I tested it by locating the elements which is part of the classes which is affected by the CSS block. I have documented my testing in a comment on issue #67. I searched both the jazzquiz directory as well as the entire Moodle directory for any references to mathjax, but I could not find any |
I think there were some changes in MathJax 3 that made the !important overrides not work anymore due to new rendering output. The default text align is center, and I remember it was distracting that the output wasn't right below the input box. My memory might be inaccurate, but if it does look like the old overrides could still be useful today, then I'd recommend figuring out a new way to do them. This might be useful information: https://stackoverflow.com/questions/65264328/mathjax-3-change-css-styles |
It is not sufficient to search the PHP code @jorgenfinsveen . I do not know what MathJax does; it does a lot. Hence we need to check the rendered HTML as well. Now, I did, so it is probably ok, but the MathJax_Display still appeared in CSS code, so I suspect I did not have a proper update of the code. I need to compare with the old version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Elements of class MathJax_Display are generated by MathJax for display math, that is TeX code in [ ... ] delimiters. That said, I do not see a difference between the two. I suppose the point is that this is redundant because MathJax no longer support the style def, as @sebastsg suggested. Or alternatively, the problem is that the enclosing tags have changed, so that they no longer match the target of the style.
Either way, the change does not make sense. Even if .MathJax_Display is no longer used, we do not want to move the style to .start-question-menu or .name. If that's the best we can do, we had better remove the style def altogether.
Now, I see that the style attempts to left justify the formula. This is a good idea because full screen jazzquiz makes a very wide box for the question, and the formula centred will often look bad. It would be a good idea if we could find a better way to achieve this.
If you do not have a better solution, I think you should comment out the original CSS code and make a new issue on the problem of centred equations. What do you think?
!important is removed on develop branch because it no longer works. |
See discussion for issue #67
Closes #67