[Webkit-unassigned] [Bug 156839] New: Resetting CSS properties on the <math> element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 21 02:11:01 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=156839

            Bug ID: 156839
           Summary: Resetting CSS properties on the <math> element
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: MathML
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: fred.wang at free.fr
        Depends on: 155433

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160421/75b61f61/attachment.html>


More information about the webkit-unassigned mailing list