This is probably better done on the API side, but maybe not.
Some earlier discussion:
DENVER seems like it doesn’t need to be in capitals, if that’s possible, and the pencil icon is a bit misaligned. I also totally expected the “search” field to close when I hit submit/enter.
Unfortunately that’s how the raw data is formatted in some cases. I thought about using text-transform to make it Title Case, but didn’t because that would mess up cities like Playa del Carmen.
Although, I guess it’d be better to have 1% of them look bad than 30%, so that seems worth doing.
Does ucwords() not apply to words like de ?
Even if it doesn’t, I guess if we did it in PHP we could always do a str_replace( ' De ', ' de ', $city ) to cut down on the damage.
Actually, the problem is with the data source, and that source has several other problems, so I think a better solution would be to just get a better source.
This is probably better done on the API side, but maybe not.
Some earlier discussion: