Electric field profile structure-especially its shear-is a natural order parameter for the edge plasma, and characterizes confinement regimes ranging from the H-mode (Wagner et al. 1982 Phys. Rev. Lett. 49, 1408-1412 (doi:10.1103/PhysRevLett.49.1408)) to the density limit (DL) (Greenwald et al. 1988 Nucl. Fusion 28, 2199-2207 (doi:10.1088/0029-5515/28/12/009)). The theoretical developments and lessons learned during 40 years of H-mode studies (Connor & Wilson 1999 Plasma Phys. Control. Fusion 42, R1-R74 (doi:10.1088/0741-3335/42/1/201); Wagner 2007 Plasma Phys. Control. Fusion 49, B1-B33 (doi:10.1088/0741-3335/49/12b/s01)) are applied to the shear layer collapse paradigm (Hong et al. 2017 Nucl. Fusion 58, 016041 (doi:10.1088/1741-4326/aa9626)) for the onset of DL phenomena. Results from recent experiments on edge shear layers and DL phenomenology are summarized and discussed in the light of L [Formula: see text] H transition physics. The theory of shear layer collapse is then developed. We demonstrate that shear layer physics captures both the well known current (Greenwald) scaling of the DL (Greenwald 2002 Plasma Phys. Control. Fusion 44, R27-R53 (doi:10.1088/0741-3335/44/8/201); Greenwald et al. 2014 Phys. Plasmas 21, 110501 (doi:10.1063/1.4901920)), as well as the emerging power scaling (Zanca, Sattin, JET Contributors 2019 Nucl. Fusion 59, 126011 (doi:10.1088/1741-4326/ab3b31)). The derivation of the power scaling theory exploits an existing model, originally developed for the L [Formula: see text] H transition (Diamond, Liang, Carreras, Terry 1994 Phys. Rev. Lett. 72, 2565-2568 (doi:10.1103/PhysRevLett.72.2565); Kim & Diamond 2003 Phys. Rev. Lett. 90, 185006 (doi:10.1103/PhysRevLett.90.185006)). We describe the enhanced particle transport events that occur following shear layer collapse. Open problems and future directions are discussed. This article is part of a discussion meeting issue 'H-mode transition and pedestal studies in fusion plasmas'.