CKTIS / CSS
background-position-y: choose the vertical offset
Move each background up or down without confusing the physical y axis with block flow.
Version: CSS Modules
Syntax
background-position-y: 25%, calc(100% - 10px);background-position-y sets the vertical component of the background position. top, center, bottom, lengths and percentages describe that component; the initial value is 0%, measured from the top when no edge is specified. A percentage uses the positioning-area height minus the image height after background-size. In particular, 100% aligns bottom edges, not the image’s top edge with the container bottom. calc(100% - 10px) positions the image 10px above its bottom-aligned location.
The y coordinate remains physical even in a vertical writing mode; it is not a substitute for a logical block-axis property. background-position-x is unchanged when only this longhand is set. A subsequent background-position or background shorthand can replace both coordinates, so declaration order matters. Comma-separated values correspond to background-image layers, with shorter lists repeated. Use background-origin to choose the reference box and background-repeat separately to control tiling.
The example has a 100×200px box with a 20×40px red image at x=10px and a 20×20px blue image at x=60px. The y values 25% and calc(100% - 10px) produce top edges at 40px and 170px. The console reports the unchanged x list and the computed y list. Repeating the fixture with vertical-rl and rtl preserves the same physical positions. Pixel checks confirm the red and blue rectangles in both boxes, not just successful parsing.
Examples
['horizontal-tb','vertical-rl'].forEach((writingMode,i)=>{
const box=document.createElement('div');box.id='y-'+i;
box.style.cssText='position:absolute;top:0;width:100px;height:200px;direction:rtl;background-image:linear-gradient(red,red),linear-gradient(blue,blue);background-size:20px 40px,20px 20px;background-repeat:no-repeat;background-position-x:10px,60px';
box.style.left=(i*120)+'px';box.style.writingMode=writingMode;box.style.backgroundPositionY='25%, calc(100% - 10px)';document.body.append(box);
const s=getComputedStyle(box);console.log(writingMode+': x='+s.backgroundPositionX+'; y='+s.backgroundPositionY);
});Result
horizontal-tb: x=10px, 60px; y=25%, calc(100% - 10px) vertical-rl: x=10px, 60px; y=25%, calc(100% - 10px)
Executed in Chromium 157.0.8103.51 with two separate gradient layers at device pixel ratio 1. The tested values use physical top-based positioning; newer logical keywords, scrolling backgrounds and different browser engines are outside this execution.