Most of the dynamic CSS Q & A show how to swap between CSS files or predefined CSS values.
My question is: during a live user session how to compute/compile CSS values for e.g. both element.width2
and width:230px
into the CSS file (element.width3
and width:430px;
) before loading it to the client-side browser. To be clear I am not looking to swap out CSS files via JavaScript, I'm seeking options for a server side answer where the CSS file is server generated/recompiled during a session is there manipulation class in .Net framework or the razor view engine? or how can I achieve this
// 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;
}