arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.54k stars 271 forks source link

Correct line color in high contrast mode on PC #2482

Open langit opened 1 month ago

langit commented 1 month ago
  <math-field read-only style="display:inline-block">
      x=\frac{-b\pm \sqrt{b^2-4ac}}{2a}
  </math-field>

Any latex code with commands that involves lines, such as x=\frac{-b\pm \sqrt{b^2-4ac}}{2a}.

1723089321612

Description

On Windows PC, if you turn on high contrast mode, and open a browser (Edge or Chrome), and visit a page with the classic formula x=\frac{-b\pm \sqrt{b^2-4ac}}{2a}, you will observe that the horizontal lines for the \frac and \sqrt commands become invisible (presumably due to its dark color that disappears into the dark background).

Steps to Reproduce

  1. On a Windows PC, turn on high contrast mode, and use a theme with dark background.
  2. Open a browser (Edge or Chrome, other browsers might also do) and point it to https://cortexjs.io/mathlive/guides/getting-started/
  3. Scroll to the section titled "Try it Out", where a formula is displayed.

Actual Behavior

The horizontal lines for the \frac and \sqrt commands seem missing.

Expected Behavior

The horizontal lines for the \frac and \sqrt commands should show up in the same color as the font.

Environment

The latest (?) MathLive version 0.101.x

Regression: No.

Operating System Windows 11

Browser I have tested with Chrome and Edge: the same problem is observed.

arnog commented 1 month ago

Cleaned up comment above.