As @richard-deeming and @alohci helped pointing out: The described behavior is likely caused by a CSS parser limitation in the browser.
The code should work as expected on newer browser versions.