# Colors from CSS, grey symbols #1169

Closed
opened this Issue Apr 19, 2015 · 5 comments

Projects
None yet
2 participants

### kaba2 commented Apr 19, 2015

 I am trying to change the color of the equations to red using CSS. However, I get this: Some symbols are red, and the others are grey. If I don't change the color at all, then the red symbols above are black, and the others are grey. What causes the grey symbols? My html reads: 

The solution to the quadratic equation is . The solution to the quadratic equation is .

 My css reads: .MathJax { color: red !important; font-size: 4em !important; }  Also, if i use the selector .ascii-math instead, then neither font-size or color is affected. Any ideas? The image above is from Chrome. Firefox gives the same result. The MathJax is loaded from the CDN. Here is my configuration script (remark_files/mathjax-config.js): MathJax.Hub.Config({ asciimath2jax: { // Disable delimiter-based detection. delimiters: [], // Disable MathJax on all class-names... ignoreClass: '.*', // ... with no exceptions. processClass: '' }, tex2jax: { // Disable delimiter-based detection. inlineMath: [], displayMath: [], // Disable MathJax on all class-names... ignoreClass: '.*', // ... with no exceptions. processClass: '' } }); // This is needed because we forward the MathJax configuration // in each file to this configuration file. MathJax.Hub.Configured();  These are in my html-head:  

Member

### dpvc commented Apr 19, 2015

 I cannot reproduce the result. Your examples work properly for me in Chrome and Firefox. I suspect that there is additional CSS on the page that is interfering. For example, if you have CSS for .mi and .mo that sets the color to black, then that could account for the problem. Without an actual example page that illustrates the problem, it is difficult to investigate the issue. Can you provide an example on jsbin or one of the other code sharing platforms?

### kaba2 commented Apr 19, 2015

 Right. I had a .css file from the Python Pygments library, where the css wasn't localized very well. Fixed that, and now the equations get colored correctly! Thanks for pointing to the right direction. I still have the second problem that if I replace the .MathJax class specifier with the .ascii-math specifier, then the colors and size are not affected. Any ideas on that?
Member

### dpvc commented Apr 19, 2015

 The .ascii-math class is on the   to get the output inside the container with class ascii-math`.

### kaba2 commented Apr 19, 2015

 Thank you dpvc. This resolved fast.
Member

### dpvc commented Apr 19, 2015

 No problem.. Glad you worked it out.