-
Notifications
You must be signed in to change notification settings - Fork 757
Description
pow() and sqrt() take calculations that must resolve to a <number>.
There is a note explaining why they only work with numbers. I understand the first argument but the second one confuses me:
[...] the result is dependent on what unit you’re expressing the argument in; if
1emis16px, thenpow(1em, 2)would give1em, whilepow(16px, 2)would give256px, or16em, which are very different values for what should otherwise be identical input arguments! [...]
First, expecting 1em as the result of pow(1em, 2) would be inconsistent with sign(1em) or abs(1em), which must wait for 1em to be resolved before evaluating their result:
Both of these functions operate on the fully simplified/resolved form of their arguments [...]
Or should sign() and abs() only work on numbers too?
Second, opacity: sqrt(100%) and color: lab(0 sqrt(100%) 0) are valid. But what is their resolved value? Or should pow() and sqrt() take calculations matching <number>?
edit: I realize the question also applies to trigonometric functions, exp(), log(), but I cannot think of a short title that would be appropriate.