PostCSS will let you process the CSS with JavaScript & AST. It takes PreProcessing CSS to new level. You can include it as processor in Webpack or Rollup.