In the classical literature of fiqh scholars adress the issue of crowded mosques, and how to pray in a case a mosque is filled to overflowing.
But so far I couldn't find any explanation or rulings about the case that people can't pray inside due to the overflow. Or as it is the case in many mosques in Morocco and elseweher in the tarweeh prayer in ramadan or jumu'ah, that the mosque offers some straw mats and put them outside of a mosque and people who come late and can't find a place inside pray there following the imam.
So I'd like to have a ruling on that (rulings from all madhhabs are welcome)?