RESOLVED DUPLICATE of bug 247738 156839
Resetting CSS properties on the <math> element
https://bugs.webkit.org/show_bug.cgi?id=156839
Summary Resetting CSS properties on the <math> element
Frédéric Wang (:fredw)
Reported 2016-04-21 02:11:01 PDT
Some of this was already done in bug 155433 and we also have been setting font-family to a fixed list of math fonts for a long time. I'm opening this for the record, although I believe we should fix it when they address a real use case as it was the case for CSS spacing and for the need for math fonts. It may arguable whether we want to reset or not a specific property. For example, someone might want to do <p style="font-weight: bold;">this is a formula <math><mi>x</mi><mo>+</mo><mi>y</mi></math></p> and expects that the formula is bold. However, math formulas use their own italic, bold etc unicode code points (see bug 108778) and math font families are generally not designed to have italic, bold fonts so that would give poor result (see for example https://github.com/khaledhosny/libertinus/issues/20 for a discussion) As a comparison, Gecko resets more rules like writing-mode or font-style: https://dxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css#16 Note that font-family in Gecko is reset to serif (btw, math fonts are generally serif and sans-serif unicode code points are reserved for special characters, see bug 108778 again) and the actual selection of the default math font and fallback are listed in font.name.serif.x-math and font.name-list.serif.x-math configurations (accessible from the font preference menu of Firefox): https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js
Attachments
Frédéric Wang (:fredw)
Comment 1 2022-11-10 09:13:09 PST
Let's make it a duplicate of bug 247738. We should just align with MathML Core here. *** This bug has been marked as a duplicate of bug 247738 ***
Note You need to log in before you can comment on or make changes to this bug.