Most Americans are accepting of transgender people, but those feelings of acceptance may not apply to their spouses and children, according to a new survey by YouGov.

YouGov, which polled 1,000 adults in June, found that 54 percent of Americans believe identifying with a gender different from the one assigned at birth is either morally acceptable or not a moral issue. But the levels of acceptance varied among age groups, with young people slightly more likely to say it's morally acceptable or not a moral issue:

But YouGov found the public may not be so tolerant when the situation involves spouses or children:

The wording of the question and the responses don't necessarily mean people would be upset at the spouse or child for being trans. Some people may not be mad at their spouse for coming out, but rather the general situation and its implications, since it could mean that someone's spouse isn't the gender a person is sexually and romantically attracted to. Some respondents may have meant that they're accepting of their children but are upset about all the issues a trans child will have to go through due to widespread discrimination.

Still, the responses regarding family members have potentially terrible implications. The 2011 National Transgender Discrimination Survey found 57 percent of trans and gender nonconforming people report family rejection. This rejection had precipitous effects: trans and gender nonconforming people who are rejected by their families are nearly three times as likely to experience homelessness, 73 percent more likely to be incarcerated, and 59 percent more likely to attempt suicide.

Rejection can also worsen someone's gender dysphoria

Rejection can also worsen someone's gender dysphoria, a state of emotional distress caused by how the gender someone was designated at birth conflicts with their gender identity. This is a serious medical condition that some — but not all — trans people suffer from, and, according to medical organizations like the American Psychiatric Association, treatment can involve allowing someone to transition without the threat of social stigma.

So if respondents meant they'd be upset at and reject their children for coming out as trans, it could have terrible implications for the child's physical, mental, and social well-being.

Watch: Life as a transgender woman