As Sephora, Ulta Beauty and other makeup stores temporarily shutter, they'll join a growing list of retailers roiled by the coronavirus outbreak, but they face unique challenges.

Closed stores will suspend many of the retailers' typical sales techniques: Tester stations, one-on-one beauty advice and complimentary makeovers. And the retailers will have to overcome potential changes in customers' habits, as people cut back on social gatherings and work from home.

Analysts and investors are unsure how long it may take for customers to return to the beauty counter — and if they'll keep up their shopping in the meantime.

Ulta Beauty said Tuesday that it is shutting all of its 1,254 retail stores until at least March 31 and also said that store pickup of online orders would not be available. Sephora, owned by Louis Vuitton parent company LVMH, is closing all U.S. and Canada stores until April 3.

Both said they'll continue online sales. Sephora said it's waiving standard shipping fees and extending its return policy to 60 days to be more online-friendly.

Benefit, also owned by LVMH, and Glossier are closing stores, too, and Glossier said it will delay the opening of a new store in Arizona.

UBS analyst Michael Goldsmith said beauty is "highly discretionary," but he said it doesn't suffer as much as some other categories in a recession. He said customers often prioritize buying makeup and skincare items, even as they watch their wallet and sometimes opt for less expensive brands.

But, he added, it's unclear how customers will shop as they stay at home. He said people may use less makeup as they stream movies instead of going out to a restaurant or concert and skip purchases, since they can't try products in stores.

"On the one hand, beauty can be a category where you can get an immediate positive emotional response from a purchase," he said. "On the other hand, in the case of prior recessions, they may not necessarily be the right comparisons for what we have now because there wasn't this social distancing."

The coronavirus outbreak has injected additional uncertainty into the cosmetics industry, which already faced a slowdown. Makeup had a compound annual growth rate of 7% to 9% from 2015 to 2017, according to a UBS note. That dropped to 4% in 2018 and it's been more volatile since, it said.

In a research note, UBS analysts said cosmetics sales are weaker because of fewer unique and trendy product launches, a shift toward skin care instead of makeup and a "Marie Kondo" effect as people limit their beauty items, among other factors.

In a recent research note, analysts from Nomura Instinet noted that Ulta already faced headwinds. It said company leaders "now fight two battles: weakness in makeup and the virus."

Ulta Beauty withdrew its guidance for fiscal 2020 Tuesday and said it would not issue an updated outlook because of uncertainty. Shares were down 5.3% to $152.80 Tuesday afternoon.

As stores are closed, retailers have encouraged shoppers to make purchases online, follow social media accounts for beauty tips and try special features, such as digital makeup try-on services.

In a letter on Glossier's website, the startup's founder and CEO Emily Weiss encouraged customers to connect with Glossier's beauty team on social media, even as they socially distance. A few years ago, she said, the company tried a FaceTime program that allowed customers to sign up for a 10-minute virtual consultation.

"Whether it's this or something like it, we're going to try to use this moment to spin up new, creative ways to foster community and connection and make magic happen," she said.

-- CNBC's Lucy Handley contributed to this story.