While looking for something else, I came across the RV Info page on the National Park Service site for Yosemite. It's here:
It says, "Food storage: You may store food in hard-sided RVs and trailers, as long the food is out of sight, and windows, doors, and vents are closed when you're not in your campsite. Food may not be stored in pop-up or tent trailers, or other soft-sided campers."
The rules are there so that you don't end up with injuries and your vehicle doesn't end up severely mangled. For more information on Yosemite's bears and food storage, read this page of the site: