I created a plugin for Rework CSS preprocessor to do math. Here is the github repo. It is also my first ever NPM package and it can be found on the website here.

/* input */
div {
  padding: math(5+5px);
}
/* output */
div {
  padding: 10px;
}

It also works with the rework-vars plugin.

/* input */
:root {
  var-fontSize: 10px;
}

div {
  padding: math((var(fontSize) * 2) + 10px);
}

/* output */
:root {
  var-fontSize: 10px;
}

div {
  padding: 30px;
}