Is it possible to change only the Y value of background position in CSS?

css, html

Solution

Only by reading (with JS) the current value of `background-position` (using a computed style method if it isn't set inline), parsing it to read the X value and then setting it again using the X value you just retrieved.

There is no way to say "Take the background position X value from the cascade and the Y value from this" in CSS.

Problem

Is it possible to change only Y value of background position in CSS? `background-position-y` is not a valid solution.

Original source

Related problems