Fix Safari percentage animation bug by switching to px values

Unfortunately this means we need to generate the keyframes at runtime
after we've measured the screen width.