量体裁衣

liàng tǐ cái yī

lit. to cut cloth according to the body (idiom)

fig. to act according to actual circumstances

liàng

capacity

body

cái

to cut out (as a dress)

clothes