That's the logical definition that I've always known.
From MW:
(1) : a binding custom or practice of a community : a rule of conduct or action prescribed or formally recognized as binding or enforced by a controlling authority (2) : the whole body of such customs, practices, or rules (3)
Offhand, I can't think of one group of people who adhere to customs, practice or rules, that they think are immoral.
That things often continue to be legal (or illegal) well after the consensus on their morality has shifted. And that is to completely put aside those laws that were patently immoral
Well yes. Law's are codified at a certain time. And then the law changes, and morality is codified at the new time. You really can't judge the morality of an action when removed from the instance and context that action happened in...
I guess I should have said codified at a certain time, but I thought that was implied.
I can stand here today and say that chattel slavery in the antebelum was wrong. But I'm saying that today, with today's morals. Time machine back to the 1840's, the moral landscape is much different, and slavery is accepted. There's even moral justification for it. Standing here in 2016 I can see that that justification is bunk, but back then it stood.
It's the same issue that researchers run into when talking about the acceptability of cannablism in native cultures. Once your removed from the act, both in space and time, you've lost the moral context.
To bring us back to our original topic, one of the purposes of codified law is to place a moral stake in the ground that serves as a reference point for everyone. You can judge people by those laws/morals after they were created (and before they are superceded by a new set of laws/morals), but you can't judge those that came before by a moral stake that didn't exist when they acted.
How about legalization of same sex marriages by US Supreme Court in recent years? When "marriage" was referred to in various laws in, say, 19th century, no one would have imagined them to apply to same sex couples given the moral codes of those times. Whereas in 2014, same text was interpreted to support same sex marriages (or at least, not prohibit them). Hard to imagine that decision in 1914.
It also operates with some weird time lags.