How can i change padding relative to letter width

How can i change padding relative to letter width not on font-size. So ,if i change font to smaller unit,the padding also changes accordingly

provide your code please

Screenshot from 2021-12-05 18-09-45

I want to change
:root padding
related to width of font not in pixel as i have done because if i change the zoom of screen the pad is distorted.

use rem instead px , so when you change the font of your root element then all the element font size will change