You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, first of all - stitches provides amazing DX and thank you for that!
Right now I'm struggling with concept of linear size between resolutions.
For example consider this situation:
I want my font size to be 12px on 640px resolution and to be 24px on 1200px resolution. Everything between I want to be based on linear function, so it would go like this:
640a + b = 12
1200a + b = 24
and then, once you solve this you get something like:
I know I can rewrite all the stitches tokens in my config, but it doesn't really seems like the quickest solution. I have my helper to calculate required components of linear function but is there any better way to accomplish that in stitches?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys, first of all - stitches provides amazing DX and thank you for that!
Right now I'm struggling with concept of linear size between resolutions.
For example consider this situation:
I want my font size to be 12px on 640px resolution and to be 24px on 1200px resolution. Everything between I want to be based on linear function, so it would go like this:
and then, once you solve this you get something like:
I know I can rewrite all the stitches tokens in my config, but it doesn't really seems like the quickest solution. I have my helper to calculate required components of linear function but is there any better way to accomplish that in stitches?
Beta Was this translation helpful? Give feedback.
All reactions