A few days ago, the gemara talked about wearing a hat that protrudes a tefach out as being assur to wear due to ohel.
How does this relate to the hats we wear today? OC 301:41 (or thereabouts) talks about it a little bit, but I haven't had too much time to look there.
I know that some of the variables include the purpose of the hat (block sun, decoration, etc.) and the tightness of the fit.
The black hats many people wear today protrude way more than a tefach. And they aren't so tight fitting, so a strong wind will blow them away, causing someone to pick it up in the reshut harabim.
And what about baseball caps worn to protect from the rain? I can understand that on a regular shabbat it can't be worn, b/c it protects from the sun. But if its raining, it serves a different purpose. Does that make any difference?