Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is background-position-x (background-position-y) a standard W3C CSS property?

I'm worried about background-position-x and background-position-y. Gecko (Firefox) and Presto (Opera) don't support them, but Webkit (Chrome, Safari) does...

Does anyone know (with official references) if this is (or will be) included in the standard?

like image 454
Guile Avatar asked Mar 11 '12 09:03

Guile


People also ask

What is background-position y in CSS?

The background-position-y CSS property sets the initial vertical position for each background image. The position is relative to the position layer set by background-origin .

What does background-position do in CSS?

The background-position property sets the starting position of a background image. Tip: By default, a background-image is placed at the top-left corner of an element, and repeated both vertically and horizontally.

What is background-position center in CSS?

background-position: center top;: This property is used to set the image at the center top position. Example: This example illustrates the use of background-position property where the position value is set to the center top position. HTML.


1 Answers

Splitting background-position into -x and -y was proposed for CSS 3 but it got rejected as the working group “considered the use case too weak to introduce new properties for.” Additionally, there seemed to be some ambiguity concerns with multiple background images and CSSOM, the API behind CSS. I’m not sure how WebKit and Trident did implement them and how they addressed these concerns.

The CSS WG blob has just reported yesterday that there will be “no change to background-position or transform-origin syntaxes.” The reason is probably due to not getting any further delays.

Maybe it will get added to CSS 4. There is a current thread on the [email protected] mailing list that you might find interesting.


Update    So apparently these properties have been approved for CSS 4 (see [CSSWG] Minutes Telecon 2014-04-16):

RESOLVED: background-position-x/-y, background-repeat-x/-y approved for level 4 of backgrounds and borders.

like image 198
Gumbo Avatar answered Sep 19 '22 20:09

Gumbo