Skip to main content

Simple math operations in number vars


Rafal_Jara

Instead of just assigning numeric vars from one collection to another, we might do simple math operations with them, and in such way create very functional systems. In many design systems we have so called “golden numbers” which function as multiplicators for other values.
e. g. :
I have some atomic var:
var: gridSize: “6”;

And then I can have this functional var:
var: padding: mode1: [gridSize]*1, mode2: [gridSize]*2, mode3: [gridSize]*3

And this way, if I change the baseGrid value, all others will automaticly update accordingly.

And thi sis something with like tons of awesome.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings