This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Evan Knight
Posted Jan 18 - Read on Facebook

Is there a simple way to use percentages for x/y position, rather than static pixel position?

8 Comments

Jordan Robert Dobson

No not really. You'd have to calculate it yourself.

Andrew Nalband

Jordan Robert Dobson why couldn't you use something like Screen.width*0.2 ?

Jordan Robert Dobson

But you can't just do 70% no...

Andrew Nalband

Haha, I mean if you're using percentages you're calculating. I could be crazy, but Screen.width*0.7 feels like the same thing

Evan Knight

Screen.width*0.2 works thanks guys

Taylor Wright

In an effort to better understand CoffeScript / JavaScript, is there anything like a getter/setter that could make this approach more elegant? I'm not wild about using %, but float positions don't bother me much… funny that.

Jordan Robert Dobson

Yep there is a get / set... Look at creating objects on MDN and how you @define, get:... , set:... Things.

Koen Bok

Yup we favor fractions over percentages throughout Framer for easy calculations.

Read the entire post on Facebook