Definitely cover your shoulders. For men, pants. For women, pants or a longish skirt. I wouldn’t take a chance on capris. I took a sundress that was calf length, but it had a short sleeve jacket that went over the dress. I probably had sandals on, but I don’t remember.
I saw a young woman in St. Peter’s who borrowed some kind of wrap around thing from someone and when she got it inside, she took it off to reveal a very short skirt that just covered her crotch. Rude. There is no admission fee to see this sacred Christian place, just a simple request to dress conservatively. If you don’t like the request, stay out. But she had to make her ‘statement’.