The idea is extremely old; the reality has yet to come.
As already stated, equality before the law goes back at least as far as ancient Greece. Aristotle, for instance, argued that people should be treated equally to the extent that they were equal and unequally to the extent that they were unequal. In other words, he thought that people should be treated in the same way unless there were relevant differences that warranted different treatment.
While not universally endorsed, this principle has been rather popular among moral and political thinkers for a very long time. The problem, however, is that what counts as a relevant difference has been debated for just as long. Skin color, religious beliefs, political beliefs, sexual orientation, ethnic origin, birthplace, and even handedness have been considered relevant by some.
The petty differences people sometimes insist upon often remind me of the Star Trek episode “Let That Be Your Last Battlefield,” in which an alien race destroys itself because its members cannot get over the fact that half of the population is black on the left side and white on the right side while the other half is white on the left side and black on the right side. This is the sword they choose to die on, yet it is no more ridiculous than some of the differences that drive various acts of mindless violence today.