  Dust plays a pivotal role in the chemical enrichment of the interstellar
medium. In the era of mid/high resolution spectra and multi-band spectral
energy distributions, testing extinctions against gas and dust-phase properties
is becoming possible. In order to test relations between metals, dust and
depletions, and comparing those to the Local Group (LG) relations, we build a
sample of 93 gamma-ray bursts and quasar absorbers (the largest sample so far)
which have extinction and elemental column density measurements available. We
find that extinctions and total column density of the volatile elements (Zn, S)
are correlated (with a best-fit of dust-to-metals (DTM) 4.05x10-22 mag cm2) and
consistent with the LG DTM relation. The refractory elements (Fe, Si) follow a
similar, but less significant, relation offset about 1 dex from the LG
relation. On the assumption that depletion onto dust grains is the cause, we
compute the total (gas+dust-phase) column density and find a remarkable
agreement with the LG DTM relation: a best-fit of 4.91x10-22 mag cm2. We then
use our results to compute the amount of 'intervening metal from unknown
sources' in random sightlines out to redshifts of z=5. Those metals implicate
the presence of dust and give rise to an average 'cosmic dust dimming' effect
which we express as a function of redshift, CDD(z). The CDD is unimportant out
to redshifts of about 3, but because it is cumulative it becomes significant at
redshifts z=3-5. Our results in this paper are based on a minimum of
assumptions and effectively relying on observations.
