[css3] background-origin question

Hello Everyone,

I was skimming through the CSS3 spec and really enjoying what I am seeing.

When I saw "background-origin" (http://www.w3.org/TR/css3-background/#the-background-origin) I got really excited; however, the more I read the more I was disappointed.  I'm excited that I can pass it key words and translate the origin to specific areas inside the element.  But for me it was the same as having "background-position" but only allowing me to have top, right, bottom & left.

I was wondering if there was a specific reason for not allowing values? For example:

background-origin: 100% 100%;

background-origin: 20px 34em;


Here is an example use case:

I have a link with simple text inside of it. The link is inline so its width will expand and contract with the amount of text.

a {
 display: inline;
 padding-right: 40px;
}

Now I want to position a background image -10px of the top right corner of the element. There is currently no way, that I am aware of, to accomplish this task.

If "background-origin" allowed values, I could do the following:

a {
 display: inline;
 padding-right: 40px;
 background-origin: 100% 0%;
 background: transparent url('icon.gif') no-repeat -10px 0px;
}

This would translate the origin from the top left corner to the top right and the image would appear -10px off the top right corner.

The only thing, I can think of, that would hinder this would be expressing another set of value pairs inside of short hand notation for "background".

I believe that all comments and suggestions have been closed for this particular topic since June 16th. So I just wanted to know what I was missing?

Thanks for all of your time and hard work.

-- Nick

Nick Morgan
nimorgan@gmail.com

Received on Wednesday, 1 September 2010 15:32:47 UTC