Skip to content

Use currentColor rather than black for menclose with no math color. #1573 #1574

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

Merged
merged 2 commits into from
Aug 5, 2016

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Aug 4, 2016

Use currentColor rather than black for menclose when mathcolor isn't specified.

Resolves issue #1573.

@pkra pkra added this to the MathJax v2.7.0 milestone Aug 4, 2016
@pkra
Copy link
Contributor

pkra commented Aug 4, 2016

LGTM.

@@ -113,7 +113,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
t = Math.max(1/SVG.em,t); // see issue #414
var H = base.h+p+t, D = base.d+p+t, W = base.w+2*(p+t);
var dx = 0, w, h, i, m, borders = [false,false,false,false];
if (!values.mathcolor) {values.mathcolor = "black"}
if (!values.mathcolor) {values.mathcolor = "currenColor"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing 't'? Should that not be "currentColor"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

( 😦 Sorry I missed that.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed it, too. The code worked because when the color attribute was set, it didn't match a valid color and was ignored, meaning that the color was inherited anyway. I'll fix it. We might be able to leave that line out entirely.

@dpvc
Copy link
Member Author

dpvc commented Aug 5, 2016

It turns out we don't need the currentColor line in the SVG output after all, but we do in the HTML-CSS output.

I don't think this needs more review, so I'm merging.

@dpvc dpvc merged commit 4779c91 into mathjax:develop Aug 5, 2016
@dpvc dpvc deleted the issue1573 branch August 5, 2016 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants