This might be viable using Sass or Less, since they have support for variables, nested selectors, etc. Although I'm not really a front-end engineer, so I don't know exactly what would be involved.
Sass or Less still output standard CSS in the end, which gets interpreted by the browsers. Anything written in Sass or Less would still have to work within the limitations of CSS.