W3C home > Mailing lists > Public > www-style@w3.org > March 2009

Re: [Backgrounds/Borders] Request to remove no-clip value from background-clip

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 26 Mar 2009 15:40:08 +1300
Message-ID: <11e306600903251940p4b61b64ap852d3c10e6179ca6@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: David Hyatt <hyatt@apple.com>, "www-style@w3.org list" <www-style@w3.org>
On Thu, Mar 26, 2009 at 3:33 PM, Brad Kemper <brad.kemper@gmail.com> wrote:

> On Mar 25, 2009, at 7:18 PM, "Robert O'Callahan" <robert@ocallahan.org>
> wrote:
>
> On Thu, Mar 26, 2009 at 2:43 PM, Brad Kemper < <brad.kemper@gmail.com>
> brad.kemper@gmail.com> wrote:
>
>> Wouldn't it be useful in case where you had, say, a logo watermark image
>> centered behind a paragraph, and you didn't want it to be clipped or resized
>> if the text was not enough lines to ensure otherwise, and you didn't want
>> the paragraph to have a min-height?
>>
>
> You could use something like this:
> p {
>   position:relative;
>   z-index:0;
> }
> p::before {
>   position:absolute;
>   z-index:-1;
>   content:url(logo.png);
>   left:0;
>   right:0;
>   width:256px;
>   margin-left:auto;
>   margin-right:auto;
> }
>
> Rob
>
>
> Yeah, I guess so. Kind of complicated and less intuitive for authors. More
> complicated for implementors otherwise.
>

It's only complicated because CSS absolute positioning makes centering an
element unnecessarily painful. *That* should be fixed.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
Received on Thursday, 26 March 2009 02:40:45 GMT

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