根据 ASP MVC 中的用户输入,在 CSS 文件中动态生成 CSS 属性

dynamic generation of CSS attributes in CSS files based on user input in ASP MVC

大多数动态 CSS 问答展示了如何 CSS 文件或预定义的 CSS 值之间交换。

我的问题是:在实时用户会话期间 如何 compute/compile CSS 值,例如 element.width2width:230px 到 CSS 文件(element.width3width:430px;),然后再加载到客户端浏览器。 明确地说,我不打算通过 JavaScript 换出 CSS 文件,我正在寻找服务器端答案的选项 CSS 文件是服务器 generated/recompiled 在会话期间 在 .Net 框架或 razor 视图引擎中是否有操作 class?或者我怎样才能做到这一点

// below are static elements, that I want change values and the CSS "keys"
.variable-sizes .element.wdth2 { width: 230px; }
.variable-sizes .element.hght2 { height: 230px; }

.variable-sizes .element.width2.height2 {

  // on the server side, from a usr setting, 
  // can I compute and fill this to some...   Width * UserVal ?  
  font-size: 2.0em;
}    

我通过 dotless 获得了其中一些功能,只是看起来有点旧,想知道它是否仍在维护。