Update to proximity CSS

Solves issues #3940 and #3941.