Well it is not that gays weren't mainstream. It was viewed as a taboo and still can be viewed as a taboo. Certain pop stars, tv show shows and LGBT character paved the way for baby gays to feel more secure when coming it out so more people are coming in general and in western developed places. But, it is not the same for everyone in different areas.
I went back to my old highschool and there's ALOT more gay people, back in my day I was the only one people sometimes thought was gay and wrote about on the bathroom walls