Body size shapes ecological interactions across and within species, ultimately influencing the evolution of large‐scale biodiversity patterns. Therefore, macroecological studies of body size provide a link between spatial variation in selection regimes and the evolution of animal assemblages through space. Multiple hypotheses have been formulated to explain the evolution of spatial gradients of animal body size, predominantly driven by thermal (Bergmann's rule), humidity (‘water conservation hypothesis’) and resource constraints (‘resource rule’, ‘seasonality rule’) on physiological homeostasis. However, while integrative tests of all four hypotheses combined are needed, the focus of such empirical efforts needs to move beyond the traditional endotherm–ectotherm dichotomy, to instead interrogate the role that variation in lifestyles within major lineages (e.g. classes) play in creating neglected scenarios of selection via analyses of largely overlooked environment–body size interactions. Here, we test all four rules above using a global database spanning 99% of modern species of an entire Order of legless, predominantly underground‐dwelling amphibians (Gymnophiona, or caecilians). We found a consistent effect of increasing precipitation (and resource abundance) on body size reductions (supporting the water conservation hypothesis), while Bergmann's, the seasonality and resource rules are rejected. We argue that subterranean lifestyles minimize the effects of aboveground selection agents, making humidity a dominant selection pressure – aridity promotes larger body sizes that reduce risk of evaporative dehydration, while smaller sizes occur in wetter environments where dehydration constraints are relaxed. We discuss the links between these principles with the physiological constraints that may have influenced the tropically‐restricted global radiation of caecilians.