octfx / mediawiki-extensions-TemplateStylesExtender

Extends TemplateStyles with new selectors and matchers.
https://mediawiki.org/wiki/Extension:TemplateStylesExtender
GNU General Public License v2.0
6 stars 3 forks source link

Allow the use of `calc()` and CSS variables combination value in positioning properties such as `left` #22

Open alistair3149 opened 2 months ago

alistair3149 commented 2 months ago

Currently, the following styles will return Invalid or unsupported value for property. It would be great to allow the use of both calc() and CSS variables as the value.

.item {
    left: calc( var( --var1 ) / var( --var2 ) * 100% );
    right: calc( ( var( --var1 ) - var( --var2 ) ) / var( --var3 ) * 100% );
}