Combinations of mixed races

As a DM I want to build immersive and memorable, but also logically coherent world. So I have question about races.

What are the rules for mixing the races?

For example, Is it possible to be half elf half gnome(elf and gnome parents) ? Can I mix everything with everything or not and why?

If so, what are the rules for racial traits? I want to know because I can use it to create some unusual NPCs, so racial traits are needed.