Percentage values instead of just pixel values (or an option to choose what you would rather see)
I would love to see the percentage value instead of pixels for margins, padding, etc. It would be especially great if you could just choose which one you wanted to see (pixels or percentages).
This option is available in Zeplin and Sketch Measures (Alt-Key for Windows, Alt/Option for Mac). It is really needed for some projects like apps for different screen sizes...
AdminAvocode Team (Team, Source) commented
I have to convert a lot of measurement values from pixels into percents % for responsive widths- and that means dividing the width of the element by the width of its html parent, and that is unknown in Avocode because it is just a sketch design. So here is a feature request if you don’t already do it:
When I see a measurement of a horizontal space, (maybe between the screen edge and a div... is 32px but perhaps next to the number 32 I could type ‘% 320’ to get a % value- and I won’t need to use my calculator on my phone.
A further example: I then need to enter another number- say the width of a smaller parent which is 200px wide. I could enter that as well and now I have started a list of ‘common parent widths’ in this screen (or app) .
Then the next measurement I just click on the number and a list of parent numbers comes up and I select the one that applies and it automatically divides and tells me what % value to use in CSS.
Petr Brzek commented
I’m not sure how to support it properly in Avocode. Percentage is relative to the containing block but we don’t have this information so you would need to mark the containing block somehow and that doesn’t sound like a good workflow. Any idea how to do it better?
width: (child width)px / (body, or container, or partent width)px * 100%;