Peel the onion and cut it crosswise into very thin slices (about 1/8 inch). Toss the slices with the salt in a bowl and let them sit for 5 minutes. Stir the sugar and vinegar together in another bowl until the sugar dissolves. Remove the onion slices from their bowl and gently squeeze out the juices. Add the onions to the vinegar-sugar mixture and set aside for 2 hours or longer. The onions will keep in a covered bowl for about a week. Drain before serving.