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

Re: [css3] background-origin question

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 1 Sep 2010 09:45:40 -0700
Cc: www-style@w3.org, "Nicholas Morgan" <nimorgan@gmail.com>
Message-Id: <8ADDA219-AC86-48B9-B100-7D6CC72B69CE@gmail.com>
To: Řyvind Stenhaug <oyvinds@opera.com>

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:

Received on Wednesday, 1 September 2010 16:46:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC