  We aim to compare variations in the full-UV dust extinction curve (912-3000
Angstrom), with the HI/H$_2$/total H content along diffuse Milky Way
sightlines, to investigate possible connections between ISM conditions and dust
properties. We combine an existing sample of 75 UV extinction curves based on
IUE and FUSE data, with atomic and molecular column densities measured through
UV absorption. The H$_2$ column density data are based on existing Lyman-Werner
absorption band models from earlier work on the extinction curves. Literature
values for the HI column density were compiled, and improved for 23 stars by
fitting a Ly$\alpha$ profile to archived spectra. We discover a strong
correlation between the H$_2$ column and the far-UV extinction, and the
underlying cause is a linear relationship between H$_2$ and the strength of the
far-UV rise feature. This extinction does not scale with HI, and the total H
column scales best with $A(V)$ instead. The carrier of the far-UV rise
therefore coincides with molecular gas, and further connections are shown by
comparing the UV extinction features to the molecular fraction. Variations in
the gas-to-extinction ratio $N(\rm{H})/A(V)$ correlate with the UV-to-optical
extinction ratio, and we speculate this could be due to coagulation or
shattering effects. Based on the H$_2$ temperature, the strongest far-UV rise
strengths are found to appear in colder and denser sightlines.

Astrophysics of Galaxies