Sexual harassment should not be confused with sexual attraction. It has nothing to do with mutual attraction or friendship. If a person feels uncomfortable with your compliment, this should tell you that the compliment is inappropriate. So if you are in doubt about how your behaviour is being received, it is better to cease the behaviour. Things said may be acceptable in an informal environment, but are not always appropriate in the workplace or in public.
People have a right to dress as they wish.
It is wrong to assume that particular styles of clothing invites sexual advances. It is an intrusion and an invasion of their rights and privacy. It's just a bit of fun. It's unfair to accuse someone of lacking a sense of humour, when sexual harassment is really a form of intimidation. It is degrading, often hostile, and can affect working conditions and careers.