This also consolidates some stuff related to updating CSS properties into a single function.
This reverts commit 8b1f7ef612.
8b1f7ef612
This reverts commit af3991d5f2.
af3991d5f2