We discuss that it is quite possible to realize the smooth transition of the universe between a matter/radiation dominated deceleration and a dark energy dominated acceleration, even with a variation of proton-to-electron mass ratio. The variation is incorporated into the theory of gravity using a cosmological Higgs scalar field with a non-trivial self-interaction potential, leading to a varying Higgs vacuum expectation value (VEV). This matches well with the data from molecular absorption spectra of a series of Quasars. In comparison with late-time cosmology, an observational consistency is reached using a Markov chain Monte Carlo simulation and JLA+OHD+BAO data sets. We find that the pattern of variation is embedded within the evolving Equation of State (EOS) of the scalar Dark Energy/Matter components, but leaves negligible trace on the effective EOS of the system. We discuss three cases of scalar extended theory of gravity, (a) a minimally coupled scalar, (b) a non-minimally coupled scalar and (c) a generalized Brans-Dicke setup. We also give a toy model of a unified cosmic history from inflation to the present era and discuss how the Higg VEV might have changed as a function of look back time.