convert js call to css rule