W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css3] background-origin question

From: Nicholas Morgan <nimorgan@gmail.com>
Date: Wed, 1 Sep 2010 13:23:15 -0400
Cc: Řyvind Stenhaug <oyvinds@opera.com>, www-style@w3.org
Message-Id: <D19B6B5E-9A27-4A5C-9F3B-B685483A4294@gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Thanks guys, I knew I was missing something.

As always, enjoying reading the discussions.

-- Nick


On Sep 1, 2010, at 12:45 PM, Brad Kemper wrote:

> 
> On Sep 1, 2010, at 9:23 AM, Řyvind Stenhaug wrote:
> 
>> On Wed, 01 Sep 2010 15:57:56 +0200, Nicholas Morgan <nimorgan@gmail.com> wrote:
>> 
>>> 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.
>> 
>> Sounds like you are being misled by the term "origin" (its usage for this property seems a bit weird, and doesn't really have anything to do with the origin of a coordinate system). Note the values allowed, they don't involve top/right/etc (or percentages) at all.
>> 
>>> 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.
>> 
>> Sounds like you want something like
>> 
>> background-position: right -10px top;
>> background-origin: content-box;
>> 
>> or just (given the padding length above)
>> 
>> background-position: right 30px top;
> 
> Right. FYI to Nicholas, the CSS3 version of background-position is described here:
> 
> http://www.w3.org/TR/css3-background/#the-background-position
Received on Wednesday, 1 September 2010 17:23:50 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT