According to international law Britain acquired the Falklands before the introduction of prohibition of force to take territory. In other words, the law as it stood at the time and not when a dispute arises.
Iraq's invasion of Kuwait is a good example of being illegal.