Maybe you read the section Customizing MathJax on the Anki FAQ page, but this article seems to be for older versions of Anki, not for recent versions. The version of MathJax that ships with Anki used to be 2.x, but has been updated to 3.x in recent versions, including AnkiDroid and AnkiMobile. See the following thread on how to customize MathJax 3.x with Javascript.
However, I would strongly recommend that you do NOT change the standard MathJax delimiters( \( ... \), \[ ... \]
), as described in the FAQ above.
As for changing the font size and color only for the MathJax block within a specific class, I think you can do it using CSS as you did in version 2.x. But, the HTML tags and classes used by MathJax are different between 3.x and 2.x. You can use Google Chrome to inspect the webview of the card screen so you can see what tags and classes MathJax uses.
Introduction - Writing Anki Add-ons
- You can now debug the webviews using an external Chrome instance, by setting the env var QTWEBENGINE_REMOTE_DEBUGGING to 8080 prior to starting Anki, then surfing to localhost:8080 in Chrome.
(Sorry for my poor English. I hope that makes sense.)