I need a way to measure distances between a container and a text field or between two text fields ( a heading and a paragraph, for example ).
Scenario: There is a container that seemingly has padding of 20 pixels on all sides, and the first element inside of it is a title of some sort. The actual padding on the top side is less than 20 pixels because of the line height of the title. I need to figure out the exact value as close as possible.
I'm looking to achieve this in any way, a hack, a native tool or a plugin.
I don't mind putting guides between elements and measuring the distance between the guides, but I couldn't figure out a way to select a text layer and get its total height - size of text in pixels + the line height.
Any advice is appreciated.
Elaborated example below:
A card has a seeming padding of 20px on each side. The first element is a title, which has a font size of 20px and a line height of 2. The total height of the title is 40 pixels ( twice the font size ), which gives us 10 extra pixels on top and bottom part of the text. So, if we measure the top padding of the card, from its edge, to the highest letter of the title, the distance is 20 pixels, but because the line height takes 10px of that, the actual padding is 10 pixels, and not 20.
This is of course a simplified example where you can do the math mentally to figure it out, unfortunately most of the time its values like 36 pixels and 1.75 line-height and such, which are not easy to calculate. So I need another method of doing this.