<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Resetting CSS properties on the &lt;math&gt; element"
   href="https://bugs.webkit.org/show_bug.cgi?id=156839">156839</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Resetting CSS properties on the &lt;math&gt; element
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>MathML
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fred.wang&#64;free.fr
          </td>
        </tr>

        <tr>
          <th>Depends on</th>
          <td>155433
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Some of this was already done in <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Reset CSS spacing rules on the &lt;math&gt; element"
   href="show_bug.cgi?id=155433">bug 155433</a> 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 &lt;p style=&quot;font-weight: bold;&quot;&gt;this is a formula &lt;math&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/math&gt;&lt;/p&gt; and expects that the formula is bold. However, math formulas use their own italic, bold etc unicode code points (see <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Add support for mathvariants that cannot be emulated via CSS"
   href="show_bug.cgi?id=108778">bug 108778</a>) and math font families are generally not designed to have italic, bold fonts so that would give poor result (see for example <a href="https://github.com/khaledhosny/libertinus/issues/20">https://github.com/khaledhosny/libertinus/issues/20</a> for a discussion)

As a comparison, Gecko resets more rules like writing-mode or font-style:

<a href="https://dxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css#16">https://dxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css#16</a>

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 <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Add support for mathvariants that cannot be emulated via CSS"
   href="show_bug.cgi?id=108778">bug 108778</a> 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):

<a href="https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js">https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>