function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Akash v 6Akash v 6 

How to know the what is the px or rem size for the slds element

Hi All

How do I know what is the px or rem siez for slds element. For example if I am using <div class="slds-p-around_medium"/> and I know if will add some paddig around the div but I would like to know the exact size for top/left/right/bottom.


You can get the clientHeight ( offsetHeight ( javascript, same as with any element.



Deepali KulshresthaDeepali Kulshrestha
Hi Akash,

Greetings to you!

You must inspect the preview output. Here, you can apply class and style. after that, you can reflect it in your code.
you can follow below link to learn more

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha