Re: [csswg-drafts] [css-values] Math Constant phi for Golden Ratio (#4702)

> However, if a design system, like GRT, relies on an equality like φ – 1 = 1 / φ, things will misalign due to, for instance, 0.6 ≠ 0.625 (for Fibonacci numbers 5 and 8).

As far as I can tell, GRT doesn't actually rely on this; it happily rounds sizes for each step to the nearest whole px.

Are these just so the produced sizes don't scare people away from using them? Probably. But it's also an indication that, whatever benefit GRT claims to bring, using a vague approximation of phi is Good Enough™.

And in the worse case, if people actually *do* want to use a more precise value, GRT boils all the math down to just eighteen constants (three sets of six values), which authors would use by storing in custom properties. (They're certainly not going to inline a bunch of high-precision decimals all across their stylesheet.) It is completely reasonable to either inline a slightly more precise value here (1.618), or store a high-precision value for phi in a variable and use it in these eighteen boilerplate calculations; authors are not expected to be using phi on the fly in this system such that readability of the constant is important.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4702#issuecomment-660385047 using your GitHub account

Received on Friday, 17 July 2020 23:54:16 UTC