Add global configuration and methods to enable the use of calc
by default in numeric operations
#40412
Labels
calc
by default in numeric operations
#40412
Looking at
bootstrap/scss/_variables.scss
Line 925 in 72d3b6e
while
add
is usingcalc
by default (See https://github.com/twbs/bootstrap/blob/main/scss/_functions.scss#L222), if$input-padding-y
is overridden to usecalc
(saycalc(2 * 14px)
), then the entire assignment will fail with an error such asbecause the outer multiplication by 2 is not using
calc
itself.Could we add a global and overridable SCSS variable (
$return-calc
) and introduce amultiply
function that would use that variable to decide whether to returncalc
or not? The existingadd
could also benefit from that global$return-calc
variable.The original assignment would then turn change to the below and would no longer fail.
I would be happy to supply a PR for this if you see value in it.
Cheers
The text was updated successfully, but these errors were encountered: