-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[v3 SVG] .MathJax path #2618
Comments
I ran into this recently myself. It turns out that some browsers do match it and others don't. Firefox doesn't, but WebKit does, so it affects Safari and Chrome (and presumably Opera, and Blink-based Edge, though I didn't verify that), but doesn't affect Firefox. I'm not sure which is correct, but because the shadow DOM created by In any case, you are right that it doesn't affect Firefox output. Adding the same CSS for |
Ah, I didn't test carefully enough. I can confirm that Chrome honors it (though it doesn't show up in the dev tools styles list).
I think the SVG 2 spec agrees with you, https://svgwg.org/svg2-draft/struct.html#UseStyleInheritance So this is then really just a browser bug. (FWIW, I can't spot a difference to the default stroke-width of 1 on any of my displays.) |
Yes, there is almost no difference between 1 and 3 when the em-size is 1000. The non-zero amount was to make some very thin areas (like in the italic lower-case "o") less likely to disappear, but I would guess 1 would do just as well. The idea was to have at least some stroke-width, and not just fill, since some areas get very thin. |
Thanks for the pointer to the documentation. I've had a quick look, and I think Firefox may be doing the right thing in this case. Apparently "complex selectors" (ones that include parent elements, like our In any case, assigning |
Since I just stumbled upon this again, the naming of this rule still seems odd compared to other style rules. |
I have made a PR to use better selectors that are more specific and target both |
Better selectors for SVG path widths. (mathjax/MathJax#2618)
Just a random note after trying to reduce the stylesheet generated by the SVG output. At
https://github.com/mathjax/MathJax-src/blob/fbd71f3f7ca06dc71304e8a2c03f13be233ccac5/ts/output/svg/Wrappers/TextNode.ts#L49-L53
the stylesheet sets .MathJax path { stroke-width: 3}.
I believe this has no effect (except when disabling fontCache) since it will not match the path in a use element shadow DOM.
The text was updated successfully, but these errors were encountered: