Put water in a medium pot and bring to a boil.
Put all baby onions and turn down the heat. Keep the water on a simmer. Cook until the onions are tender, around 15 to 20 minutes.
Drain the onions and pat them dry with a clean kitchen cloth.
Season with salt and keep tossing the onions until they turn brown, about 3 to 5 minutes.
Pour some of the balsamic vinegar and sprinkle some of the sugar. You must keep tasting from this point, and adjust the amount of vinegar and sugar accordingly. Remember that adding the raisins later will provide more sweetness.
Keep shaking the pan until the sugar dissolves and the vinegar boils. Keep it boiling for around 3 more minutes, while you continue tossing the onions until you see the syrup forming (and thickening).
Add the raisins and some of the toasted pine nuts. Mix for a minute to combine and take the pan off the heat.
To serve, drizzle the onions with a bit of the syrup on top and sprinkle the remaining pine nuts.