Search code examples
cssjqmath

jqMath: how to change the color of an expression?


I have this DOM class which I add to a jqMath expression to change the color of part of an equation which I've written using jqmath and the corresponding CSS:

.myclass {
  color: blue;
}

The thing is the color usually changes as expected but this is not the case if I have for example a division in the equation like this: $d/\dx[x^2]$. In this case the color isn't applied to the division (neither to numerator nor to denominator). As far as I know to add a class in jqmath I have to use this \cl "myclass" command.

Edit: This is my css:

#myid {
  align-text: left;
}
.myclass {
  color: blue;
}
.myclass:active {
  font-weight: bold;
}

and html:

<body>
  <div>
    <p id='myid' >$\cl 'myclass' {d/\dx[x]}$</p>
    <br>
  </div>
</body>

Solution

  • just in case anybody have the same problem i solved it by adding a * next to the class in css

    .myclass *{
    color:blue ;
    }