How to replace units in less

for example, my padding value is 20px 30px

.

is there any way to replace this value with 20rem 30rem

I see a unit function in the less document that can replace units, but this can only replace a single unit, such as 1px 2px 3px 4px , which cannot be replaced

.
Mar.10,2021

well, we've found a solution

@value: 1px 2px 3px 4px;

div{
    padding: e(replace("@{value}", px, rem));
}
Menu